mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
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:
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user