Add reboot play
This commit is contained in:
parent
f1280f1e5e
commit
41600e2204
13
reboot.yml
Executable file
13
reboot.yml
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
---
|
||||||
|
- hosts: db,web,game
|
||||||
|
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