Skip to content

Commit 0882aa2

Browse files
authored
Merge pull request #47 from Poorna-Gottimukkula1/br_netfilter
Add conditional reboot after kernel-modules-extra package update
2 parents a2b4551 + 2cdfd64 commit 0882aa2

File tree

2 files changed

+5
-3
lines changed
  • kubetest2-tf/data/k8s-ansible/roles

2 files changed

+5
-3
lines changed

kubetest2-tf/data/k8s-ansible/roles/update-node-os/tasks/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package:
1515
name: kernel-modules-extra
1616
state: present
17+
register: kmod_extra
1718
when:
1819
- ansible_pkg_mgr in ['yum', 'dnf']
1920
- ansible_distribution_major_version | int >= 10

kubetest2-tf/data/k8s-ansible/roles/update-pkgs/tasks/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
name: update-node-os
1515
when: ansible_distribution in ['CentOS', 'RHEL']
1616

17-
- name: Reboot if necessary
17+
- name: Reboot if kernel-modules-extra updated or reboot if necessary
1818
reboot:
19-
when: reboot_check.rc == 1 and ansible_distribution in ['CentOS', 'RHEL']
20-
19+
when:
20+
- ansible_distribution in ['CentOS', 'RedHat']
21+
- kmod_extra.changed or reboot_check.rc == 1

0 commit comments

Comments
 (0)