- hosts: all remote_user: root tasks: - name: upgrade debian systems ansible.builtin.apt: update_cache: yes upgrade: dist cache_valid_time: 3600 when: ansible_distribution == 'Debian'