kayobe/ansible/roles/libvirt-vm/tasks/destroy-volumes.yml
Mark Goddard c01f5834cb Add kayobe seed vm deprovision command
This command will destroy the seed VM and all associated data volumes.
2017-08-07 12:08:41 +00:00

12 lines
320 B
YAML

---
- name: Ensure the VM volumes do not exist
script: >
destroy_virt_volume.sh
{{ item.name }}
{{ item.pool }}
with_items: "{{ libvirt_vm_volumes }}"
register: volume_result
changed_when:
- "{{ volume_result | success }}"
- "{{ (volume_result.stdout | from_json).changed | default(True) }}"