Fix: reboot nodes after installing kernel-modules-extra package (#711)

* fix: nodes reboot after kernel-modules-extra installation

* chore: pre-commit fix
This commit is contained in:
Marc Palacín
2026-09-06 00:26:52 +02:00
committed by GitHub
parent 1a244636ea
commit 24054385e4
+9 -1
View File
@@ -68,7 +68,7 @@
- name: Install kernel-modules-extra if br_netfilter missing
ansible.builtin.yum:
name: kernel-modules-extra
name: "kernel-modules-extra-{{ ansible_kernel }}"
state: present
update_cache: true
register: kernel_modules_installed
@@ -76,6 +76,14 @@
- ansible_os_family == "RedHat"
- br_netfilter_exists.stdout | int == 0
- name: Reboot node if kernel modules package was installed
ansible.builtin.reboot:
msg: "Rebooting to apply new kernel modules package"
reboot_timeout: 300
when:
- ansible_os_family == "RedHat"
- kernel_modules_installed is changed
- name: Add br_netfilter to /etc/modules-load.d/
ansible.builtin.copy:
content: br_netfilter