diff --git a/roles/base_system/tasks/upgrade.yml b/roles/base_system/tasks/upgrade.yml index ca5e602..34c8659 100644 --- a/roles/base_system/tasks/upgrade.yml +++ b/roles/base_system/tasks/upgrade.yml @@ -4,16 +4,16 @@ name: "*" state: latest update_cache: true - when: ansible_distribution in [ "Debian", "Ubuntu" ] + when: ansible_facts.pkg_mgr == "apt" - name: Upgrade all packages with ‹dnf› ansible.builtin.dnf: name: "*" state: latest - when: ansible_distribution in [ "AlmaLinux", "CentOS", "Fedora" ] + when: ansible_facts.pkg_mgr == "dnf" - name: Upgrade all packages with ‹zypper› community.general.zypper: name: "*" state: latest - when: "'openSUSE' in ansible_distribution" + when: ansible_facts.pkg_mgr == "zypper"