Add nagios downtime to vhost-reboot playbook

This commit is contained in:
Kevin Fenzi 2013-04-09 23:24:22 +00:00
parent 1cf8f1964e
commit 9259cadfc5

View file

@ -40,7 +40,7 @@
tasks:
- name: tell nagios to shush
action: nagios action=silence host=${inventory_hostname_short}
action: nagios action=downtime minutes=60 service=host host=$inventory_hostname
delegate_to: noc01.phx2.fedoraproject.org
- name: echo-y
@ -51,18 +51,13 @@
- name: wait for them to die
local_action: wait_for port=22 delay=30 timeout=300 state=stopped host=${inventory_hostname}
- name: tell nagios to unshush
action: nagios action=unsilence host=${inventory_hostname_short}
delegate_to: noc01.phx2.fedoraproject.org
- name: reboot vhost
hosts: $target
user: root
tasks:
- name: tell nagios to shush
action: nagios action=silence host=${inventory_hostname_short}
action: nagios action=downtime minutes=60 service=host host=$inventory_hostname
delegate_to: noc01.phx2.fedoraproject.org
- name: halt -r the $target
@ -71,10 +66,6 @@
- name: wait for $target to come back - up to 6 minutes
local_action: wait_for host=$target port=22 delay=120 timeout=420
- name: tell nagios to unshush
action: nagios action=unsilence host=${inventory_hostname_short}
delegate_to: noc01.phx2.fedoraproject.org
- name: look up vmlist
action: virt command=list_vms
register: newvmlist