Move all virsh commands to be run on vmhost

This commit is contained in:
Timo Makinen 2022-07-11 11:27:50 +00:00
parent 436b583572
commit 54ce042c58

View file

@ -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