--- # tasks file for os_update - name: What OS? ansible.builtin.debug: msg: "ansible_os_family={{ ansible_os_family }}" - name: Update with DNF import_tasks: update_dnf.yml when: ansible_pkg_mgr == 'dnf' - name: Update with YUM import_tasks: update_yum.yml when: ansible_pkg_mgr == 'yum' - name: Update with APT import_tasks: update_apt.yml when: ansible_pkg_mgr == 'apt' or ansible_pkg_mgr == 'zypper' - name: Update with pacman import_tasks: update_pacman.yml when: ansible_pkg_mgr == 'pacman'