Rework reboot scripts

This commit is contained in:
Salt 2021-02-23 04:11:07 -06:00
parent 0ff0a90827
commit 9c0222fc28
2 changed files with 15 additions and 2 deletions

13
reboot-home.yml Executable file
View 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

View File

@ -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