Fix zypper/SUSE invocations

This commit is contained in:
Sven Velt 2024-07-09 13:57:21 +02:00
parent be0a6e32e9
commit 40cf9c615b

View file

@ -9,7 +9,13 @@
- name: Update index files
package:
update_cache: true
# when: ansible_pkg_mgr not in []
when: ansible_pkg_mgr not in ["zypper"]
- name: Update index files
package:
name: zypper
update_cache: true
when: ansible_pkg_mgr in ["zypper"]
##############################################################################
@ -30,9 +36,15 @@
upgrade: yes
when: ansible_pkg_mgr in ["apk", "pacman", "xbps"]
- name: Others -- Upgrade all packages
- name: RedHat/Void -- Upgrade all packages
package:
name: "*"
state: latest
when: ansible_pkg_mgr not in ["apk", "apt", "pacman", "xbps"]
when: ansible_pkg_mgr in ["dnf", "xbps", "yum"]
- name: SUSE -- Upgrade all packages
package:
name: "*"
state: dist-upgrade
when: ansible_pkg_mgr in ["zypper"]