Add nagios silencing to the fmn upgrade playbook.

This commit is contained in:
Ralph Bean 2014-12-15 20:03:58 +00:00
parent 10b316d114
commit 1b7dec35e2

View file

@ -1,4 +1,3 @@
# TODO disable and re-enable nagios
- name: push packages out
hosts: notifs-backend;notifs-backend-stg;notifs-web;notifs-web-stg
user: root
@ -28,6 +27,12 @@
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- name: tell nagios to shush w.r.t. the frontend
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
roles:
- notifs/frontend
@ -42,6 +47,12 @@
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- name: tell nagios to shush w.r.t. the backend
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
roles:
- notifs/backend
@ -55,6 +66,12 @@
- name: And... start the backend again
service: name="fedmsg-hub" state=started
post_tasks:
- name: tell nagios to unshush w.r.t. the backend
nagios: action=unsilence service=host host={{ inventory_hostname }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
- name: restart the frontend
hosts: notifs-web;notifs-web-stg
user: root
@ -65,3 +82,9 @@
tasks:
- service: name="httpd" state=started
post_tasks:
- name: tell nagios to unshush w.r.t. the frontend
nagios: action=unsilence service=host host={{ inventory_hostname }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true