2020-07-08 04:03:31 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
2020-08-23 01:15:18 -05:00
|
|
|
- hosts: dbservers,webservers,gameservers
|
2020-07-08 04:03:31 -05:00
|
|
|
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
|