Rework reboot scripts
This commit is contained in:
parent
0ff0a90827
commit
9c0222fc28
13
reboot-home.yml
Executable file
13
reboot-home.yml
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- hosts: pik8s_nodes,pik8s_masters
|
||||
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 or reboot_force
|
||||
become: yes
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- hosts: db,web,game
|
||||
- hosts: prod
|
||||
serial: 1
|
||||
tasks:
|
||||
- name: check for reboot-required
|
||||
@ -9,5 +9,5 @@
|
||||
register: s
|
||||
- name: reboot
|
||||
reboot: reboot_timeout=300
|
||||
when: s.stat.exists
|
||||
when: s.stat.exists or reboot_force
|
||||
become: yes
|
Loading…
Reference in New Issue
Block a user