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
|
register: _virt_pools
|
||||||
|
|
||||||
- name: Stop running VMs
|
- name: Stop running VMs
|
||||||
command: "virsh destroy {{ hostvars[item]['server_hostname'] }}"
|
virt:
|
||||||
failed_when: false
|
name: "{{ hostvars[item]['server_hostname'] }}"
|
||||||
|
state: shutdown
|
||||||
when:
|
when:
|
||||||
- hostvars[item]['server_vm'] | default(false) | bool
|
- hostvars[item]['server_vm'] | default(false) | bool
|
||||||
with_items: "{{ groups['pxe_servers'] }}"
|
with_items: "{{ groups['pxe_servers'] }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user