Skip to content

Commit e84cc0b

Browse files
committed
make reboot conditional on package or SELinux changes again
1 parent fe42ccf commit e84cc0b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ansible/bootstrap.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,14 @@
226226
- selinux
227227
- update
228228
tasks:
229+
- name: Check for pending reboot from package updates
230+
command:
231+
cmd: dnf needs-restarting
232+
register: update_reboot_required
229233
- name: Reboot to cover SELinux state change or package upgrades
230234
reboot:
231235
post_reboot_delay: 30
236+
when: (sestatus['reboot_required'] | default(false)) or (update_reboot_required.stdout != '')
232237
- name: Wait for hosts to be reachable
233238
wait_for_connection:
234239
sleep: 15

0 commit comments

Comments
 (0)