Move all virsh commands to be run on vmhost
This commit is contained in:
parent
436b583572
commit
54ce042c58
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue