aboutsummaryrefslogtreecommitdiff
path: root/roles/libvirt/tasks/vm-undefine.yml
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2023-05-28 10:02:07 -0400
committerspmfox <spmfox@foxwd.com>2023-05-28 10:02:07 -0400
commitff35c64d337a286ac2864c8403c1840e28bb23b1 (patch)
tree36062b6fbe326b61c5abaa11721f4a909364af5a /roles/libvirt/tasks/vm-undefine.yml
parentefebf42259944acef6389937736995a0af8c17d5 (diff)
Initial commit
Diffstat (limited to 'roles/libvirt/tasks/vm-undefine.yml')
-rw-r--r--roles/libvirt/tasks/vm-undefine.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/libvirt/tasks/vm-undefine.yml b/roles/libvirt/tasks/vm-undefine.yml
new file mode 100644
index 0000000..a43b12b
--- /dev/null
+++ b/roles/libvirt/tasks/vm-undefine.yml
@@ -0,0 +1,9 @@
+- name: Destroy VM
+ community.libvirt.virt:
+ name: "{{ libvirt_vm_name }}"
+ state: destroyed
+
+- name: Undefine VM
+ community.libvirt.virt:
+ name: "{{ libvirt_vm_name }}"
+ command: undefine