mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 12:07:34 +08:00
add a host-reboot playbook that checks for the host returning
This commit is contained in:
16
playbooks/host-reboot.yml
Normal file
16
playbooks/host-reboot.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# requires --extra-vars="hosts=hostspec"
|
||||
|
||||
- name: reboot hosts
|
||||
hosts: $hosts
|
||||
user: root
|
||||
|
||||
tasks:
|
||||
- name: halt -r the host
|
||||
action: command /sbin/halt -r
|
||||
|
||||
- name: wait for $host to come back - up to 6 minutes
|
||||
local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=420
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user