2013-03-04 22:37:13 +00:00
|
|
|
# requires --extra-vars="target=hostspec"
|
2012-12-11 21:59:32 +00:00
|
|
|
|
|
|
|
- name: reboot hosts
|
2013-12-20 01:17:06 +00:00
|
|
|
hosts: "{{ target }}"
|
|
|
|
gather_facts: False
|
2012-12-11 21:59:32 +00:00
|
|
|
user: root
|
2012-12-14 03:52:07 +00:00
|
|
|
serial: 1
|
2012-12-11 21:59:32 +00:00
|
|
|
|
|
|
|
tasks:
|
2012-12-12 21:31:56 +00:00
|
|
|
- name: tell nagios to shush
|
2015-05-04 14:38:03 +00:00
|
|
|
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
2020-06-14 14:14:31 -07:00
|
|
|
delegate_to: noc01.iad2.fedoraproject.org
|
2013-12-20 01:17:06 +00:00
|
|
|
ignore_errors: true
|
2012-12-12 04:43:49 +00:00
|
|
|
|
2014-09-30 16:48:50 +00:00
|
|
|
- name: reboot the host
|
|
|
|
command: /sbin/shutdown -r 1
|
2012-12-12 04:43:49 +00:00
|
|
|
|
2014-09-30 16:48:50 +00:00
|
|
|
- name: wait for host to come back - up to 15 minutes
|
|
|
|
local_action: wait_for host={{ target }} port=22 delay=120 timeout=900 search_regex=OpenSSH
|
2012-12-11 21:59:32 +00:00
|
|
|
|
2014-09-30 16:48:50 +00:00
|
|
|
- name: sync time
|
2015-08-31 16:35:06 +00:00
|
|
|
command: ntpdate -u 1.rhel.pool.ntp.org
|
2012-12-11 21:59:32 +00:00
|
|
|
|
2014-09-30 16:48:50 +00:00
|
|
|
- name: tell nagios to unshush
|
2015-05-04 14:38:03 +00:00
|
|
|
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
2020-06-14 14:14:31 -07:00
|
|
|
delegate_to: noc01.iad2.fedoraproject.org
|
2014-09-30 16:48:50 +00:00
|
|
|
ignore_errors: true
|