Use /var/run/reboot-required to determine if a restart is needed

The current check only looks to see if a new kernel was installed.
pull/125/head
Kevin Cernekee 8 years ago
parent 09bbc4058c
commit 433389c0ab

@ -12,7 +12,7 @@
- name: Check if reboot is required
shell: >
if [[ $(readlink -f /vmlinuz) != /boot/vmlinuz-$(uname -r) ]]; then echo "required"; else echo "no"; fi
if [[ -e /var/run/reboot-required ]]; then echo "required"; else echo "no"; fi
args:
executable: /bin/bash
register: reboot_required

Loading…
Cancel
Save