added virsh destroy to nuke

This commit is contained in:
Egon Rijpkema 2018-07-18 14:05:27 +02:00
parent 0b92467965
commit 3369b5d9d9

View File

@ -14,3 +14,12 @@
- name: remove volumes - name: remove volumes
shell: "rm -rf /srv" shell: "rm -rf /srv"
- hosts: nova-compute
gather_facts: false
become: True
tasks:
- name: kill all vm's
shell: "for machine in $(virsh list --uuid ); do virsh destroy $machine ; done"
- name: wipe all vm's
shell: "for machine in $(virsh list --uuid --all); do virsh undefine $machine ; done"