From 35ba5f40cc9b4dc2c07dc236c5c2272afd2d673f Mon Sep 17 00:00:00 2001 From: spmfox Date: Mon, 28 Apr 2025 18:53:50 -0400 Subject: host: tweaking dnf patching logic --- roles/host/tasks/patching.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'roles/host/tasks') 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" -- cgit