22 lines
611 B
YAML
22 lines
611 B
YAML
# requires --extra-vars="target=hostspec"
|
|
|
|
---
|
|
- name: Reboot hosts
|
|
hosts: "{{ target }}"
|
|
gather_facts: false
|
|
user: root
|
|
serial: 1
|
|
|
|
tasks:
|
|
- name: Tell nagios to shush
|
|
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
|
delegate_to: noc01.iad2.fedoraproject.org
|
|
ignore_errors: true
|
|
|
|
- name: Reboot the host
|
|
reboot: reboot_timeout=1800
|
|
|
|
- name: Tell nagios to unshush
|
|
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
|
delegate_to: noc01.iad2.fedoraproject.org
|
|
ignore_errors: true
|