diff --git a/playbooks/include/deploy-kvm-guest.yml b/playbooks/include/deploy-kvm-guest.yml index 2e528b5..94cc48e 100644 --- a/playbooks/include/deploy-kvm-guest.yml +++ b/playbooks/include/deploy-kvm-guest.yml @@ -103,14 +103,13 @@ - name: wait for install to finish virt: - uri: "{{ vmhost_uri }}" name: "{{ inventory_hostname }}" command: status register: vmstatus until: vmstatus.status == "shutdown" retries: 1000 delay: 20 - delegate_to: localhost + delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms - name: clean tempdir @@ -122,10 +121,9 @@ - name: start vm virt: - uri: "{{ vmhost_uri }}" name: "{{ inventory_hostname }}" command: start - delegate_to: localhost + delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms - name: wait for ssh to start