This should work for both rhel6 and rhel7 virthosts (with a slight delay)
This commit is contained in:
parent
bc5e431cb6
commit
2c6b628311
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@
|
||||||
when: inventory_hostname.find('.stg.') != -1
|
when: inventory_hostname.find('.stg.') != -1
|
||||||
|
|
||||||
- name: halt the vm instances - to poweroff
|
- name: halt the vm instances - to poweroff
|
||||||
command: /sbin/halt -p
|
command: /sbin/shutdown -h
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
# if one of them is down we don't care
|
# if one of them is down we don't care
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: reboot the virthost
|
- name: reboot the virthost
|
||||||
command: /sbin/reboot
|
command: /sbin/shutdown -r
|
||||||
|
|
||||||
- name: wait for virthost to come back - up to 15 minutes
|
- name: wait for virthost to come back - up to 15 minutes
|
||||||
local_action: wait_for host={{ target }} port=22 delay=120 timeout=900
|
local_action: wait_for host={{ target }} port=22 delay=120 timeout=900
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue