Hi,
Here's a snippet that I use:
- name: wait for the vm to shut down
virt:
command: status
name: "{{ inventory_hostname }}"
register: vmstatus
until: vmstatus.status == 'shutdown'
delegate_to: "{{ vmhost }}"
retries: 1500
delay: 10
vmhost = the hypervisor on which the VM runs.
HTH,
Patrick
On 27-10-16 21:05, Nitin Mathur wrote:
Were you able to figure this out? Or any suggestions??
On Monday, April 4, 2016 at 6:05:15 AM UTC-7, Rob Verduijn wrote:
Hello,
When shutting down a kvm guest using the task
- name: shut down kvm guest
virt: name=kvm-guest state=shutdown
Ansible will continue when the virsh shutdown kvm-guest command is
finished.
However I want it to wait for the guest to actually finnish the
shutdown procedure.
Anybody who knows how to do this ?
Rob Verduijn
--
You received this message because you are subscribed to the Google
Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a6045c13-303b-4adc-b718-d62afde3b523%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/a6045c13-303b-4adc-b718-d62afde3b523%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/304ec64d-dd31-83f5-f225-b00f545c4b87%40laimbock.com.
For more options, visit https://groups.google.com/d/optout.