Merge "MNAIO: Use virt module to shut VM's down when saving images"

This commit is contained in:
Zuul 2018-08-16 17:35:18 +00:00 committed by Gerrit Code Review
commit 4b750d0acf

View File

@ -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'] }}"