diff options
| author | spmfox <spmfox@foxwd.com> | 2025-04-28 18:53:50 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2025-04-28 18:53:50 -0400 |
| commit | 35ba5f40cc9b4dc2c07dc236c5c2272afd2d673f (patch) | |
| tree | 4f2331c304247acb57b3742dfda51fe100dbe0a9 /roles | |
| parent | 0c80cf21a99986e872b6e45383628dbf7f4c28bd (diff) | |
host: tweaking dnf patching logic
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/host/tasks/patching.yml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/roles/host/tasks/patching.yml b/roles/host/tasks/patching.yml index 35ec727..90f8e33 100644 --- a/roles/host/tasks/patching.yml +++ b/roles/host/tasks/patching.yml @@ -1,4 +1,4 @@ -- name: Block for RHEL 9 +- name: Block for dnf block: - name: Install dnf-automatic ansible.builtin.package: @@ -17,10 +17,9 @@ enabled: true state: "started" when: - - ansible_distribution_file_variety == "RedHat" - - ansible_distribution_major_version == "9" + - ansible_pkg_mgr == "dnf" -- name: Block for Fedora 41 and higher +- name: Block for dnf5 block: - name: Install dnf5-plugin-automatic ansible.builtin.package: @@ -42,5 +41,4 @@ enabled: true state: "started" when: - - ansible_distribution == "Fedora" - - ansible_distribution_major_version |int >= 41 + - ansible_pkg_mgr == "dnf5" |
