From c23ef774e48d9439986594df2ddb20fbac473c37 Mon Sep 17 00:00:00 2001 From: Softplus+ <195996161+softplus10@users.noreply.github.com> Date: Fri, 5 Dec 2025 03:32:00 +0900 Subject: [PATCH] refactor(prereq): use ansible_os_family for broader RHEL support (#469) Changed the condition from checking specific 'ansible_distribution' names to 'ansible_os_family == "RedHat"'. This correctly targets all RHEL-based systems (including AlmaLinux, Rocky, CentOS) and ensures dependencies like 'kernel-modules-extra' are installed without listing each distribution manually. Signed-off-by: Hanseung Kim --- roles/prereq/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/prereq/tasks/main.yml b/roles/prereq/tasks/main.yml index 5ca1a5a..741e072 100644 --- a/roles/prereq/tasks/main.yml +++ b/roles/prereq/tasks/main.yml @@ -12,7 +12,7 @@ update_cache: "{{ airgap_dir is not defined }}" - name: Install Dependent RHEL 10 Package - when: ansible_distribution in ['RedHat'] and ansible_distribution_major_version == "10" + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "10" ansible.builtin.dnf: name: kernel-modules-extra # Load br_netfilter module update_cache: "{{ airgap_dir is not defined }}"