1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
--- - hosts: all # strategy: free become: true tasks: - name: Install updates (apt) ansible.builtin.apt: name: "*" state: latest update_cache: yes when: - ansible_os_family == "Debian" - name: Install updates (pacman) community.general.pacman: upgrade: yes update_cache: yes when: - ansible_os_family == "Archlinux"