ansible/playbooks/host_reboot.yml
Kevin Fenzi 54bfe96cdc host_reboot: move to same pattern as vhost_reboot
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-01-29 09:21:46 -08:00

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