1 2 3 4 5 6 7 8 9 10 11 12 13
--- - hosts: - update remote_user: root tasks: - name: Mise à jour système avec yum yum: name=* state=latest when: ansible_pkg_mgr == "yum" - name: Mise à jour système avec dnf dnf: name=* state=latest when: ansible_pkg_mgr == "dnf"