added virsh destroy to nuke

This commit is contained in:
Egon Rijpkema 2018-07-18 14:05:27 +02:00
parent 0b92467965
commit 3369b5d9d9
1 changed files with 9 additions and 0 deletions

View File

@ -14,3 +14,12 @@
- name: remove volumes
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"