Unverified Commit c23ef774 authored by Softplus+'s avatar Softplus+ Committed by GitHub
Browse files

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: default avatarHanseung Kim <u72mlzb@gmail.com>
parent 3b34d679
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 }}"