Add reboot playbook
This commit is contained in:
parent
66e998d5a6
commit
4e100ac6df
15
reboot.yml
Executable file
15
reboot.yml
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
serial: 1
|
||||||
|
tasks:
|
||||||
|
- name: Check for reboot-required
|
||||||
|
stat:
|
||||||
|
path: "/var/run/reboot-required"
|
||||||
|
register: s
|
||||||
|
- name: Reboot
|
||||||
|
reboot:
|
||||||
|
reboot_timeout: 300
|
||||||
|
when: s.stat.exists
|
||||||
|
become: yes
|
Loading…
x
Reference in New Issue
Block a user