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
|
- name: wait for install to finish
|
||||||
virt:
|
virt:
|
||||||
uri: "{{ vmhost_uri }}"
|
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
command: status
|
command: status
|
||||||
register: vmstatus
|
register: vmstatus
|
||||||
until: vmstatus.status == "shutdown"
|
until: vmstatus.status == "shutdown"
|
||||||
retries: 1000
|
retries: 1000
|
||||||
delay: 20
|
delay: 20
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when: inventory_hostname not in result.list_vms
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
- name: clean tempdir
|
- name: clean tempdir
|
||||||
|
@ -122,10 +121,9 @@
|
||||||
|
|
||||||
- name: start vm
|
- name: start vm
|
||||||
virt:
|
virt:
|
||||||
uri: "{{ vmhost_uri }}"
|
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
command: start
|
command: start
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when: inventory_hostname not in result.list_vms
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
- name: wait for ssh to start
|
- name: wait for ssh to start
|
||||||
|
|
Loading…
Add table
Reference in a new issue