Lets see if this is a bit cleaner and more ansibley

This commit is contained in:
Kevin Fenzi 2014-07-03 16:37:35 +00:00
parent ece93a1936
commit 84212e5e66

View file

@ -18,12 +18,13 @@
delegate_to: "{{ vmhost }}"
when: inventory_hostname not in result.list_vms
- name: wait for the install to finish - by watching the domstate
# this just keeps checking the domstate until it stops running
shell: while `/usr/bin/virsh domstate {{ inventory_hostname }} | grep -q running` ; do sleep 10; done
- name: wait for the install to finish
virt: command=status name={{ inventory_hostname }}
register: vmstatus
until: vmstatus.status == 'shutdown'
delegate_to: "{{ vmhost }}"
async: 1500
poll: 15
retries: 150
delay: 10
when: inventory_hostname not in result.list_vms
- name: start the vm up