notes for future expansion with nagios
This commit is contained in:
parent
3badbe4f91
commit
46a373f797
1 changed files with 5 additions and 2 deletions
|
@ -10,14 +10,17 @@
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: needsreboot
|
register: needsreboot
|
||||||
|
|
||||||
|
# ADDME tell nagios to be quiet
|
||||||
|
|
||||||
- name: reboot the host
|
- name: reboot the host
|
||||||
action: command touch /tmp/would-reboot
|
action: command /sbin/reboot
|
||||||
#/sbin/reboot
|
|
||||||
only_if: "'${needsreboot.stdout}'.find('yes') != -1"
|
only_if: "'${needsreboot.stdout}'.find('yes') != -1"
|
||||||
|
|
||||||
- name: wait for host to come back - up to 6 minutes
|
- name: wait for host to come back - up to 6 minutes
|
||||||
local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=420
|
local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=420
|
||||||
only_if: "'${needsreboot.stdout}'.find('yes') != -1"
|
only_if: "'${needsreboot.stdout}'.find('yes') != -1"
|
||||||
|
|
||||||
|
# ADDME give nagios the all clear
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue