Skip to content

Instantly share code, notes, and snippets.

View gmzabos's full-sized avatar
🎨
Painting...

Gerald-Markus Zabos gmzabos

🎨
Painting...
View GitHub Profile
@edrzmr
edrzmr / ansible-reboot.yaml
Last active October 11, 2019 21:26
ansible waiting for reboot, really really works!
- name: 'check if reboot is required'
shell: if [ $(readlink -f /vmlinuz) != /boot/vmlinuz-$(uname -r) ]; then echo 'yes'; else echo 'no'; fi
ignore_errors: true
register: reboot
- name: 'reboot...'
shell: nohup bash -c 'sleep 2 && shutdown -r now "Ansible kernel update applied"' &
async: 0
poll: 0
ignore_errors: true