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 <u72mlzb@gmail.com>
This commit is contained in:
Softplus+
2025-12-05 03:32:00 +09:00
committed by GitHub
parent 3b34d679e5
commit c23ef774e4

View File

@@ -12,7 +12,7 @@
update_cache: "{{ airgap_dir is not defined }}" update_cache: "{{ airgap_dir is not defined }}"
- name: Install Dependent RHEL 10 Package - 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: ansible.builtin.dnf:
name: kernel-modules-extra # Load br_netfilter module name: kernel-modules-extra # Load br_netfilter module
update_cache: "{{ airgap_dir is not defined }}" update_cache: "{{ airgap_dir is not defined }}"