Merge "MNAIO: Use virt module to shut VM's down when saving images"
This commit is contained in:
commit
4b750d0acf
@ -37,8 +37,9 @@
|
||||
register: _virt_pools
|
||||
|
||||
- name: Stop running VMs
|
||||
command: "virsh destroy {{ hostvars[item]['server_hostname'] }}"
|
||||
failed_when: false
|
||||
virt:
|
||||
name: "{{ hostvars[item]['server_hostname'] }}"
|
||||
state: shutdown
|
||||
when:
|
||||
- hostvars[item]['server_vm'] | default(false) | bool
|
||||
with_items: "{{ groups['pxe_servers'] }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user