From 263907032beb7aea4b50e3e976ad4ded5b46761e Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 31 Oct 2022 00:02:50 +1300 Subject: [PATCH] delete fw vars before undefine --- ansible/roles/vm_destroy/tasks/destroy.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/roles/vm_destroy/tasks/destroy.yaml b/ansible/roles/vm_destroy/tasks/destroy.yaml index 72152df..72a6d24 100644 --- a/ansible/roles/vm_destroy/tasks/destroy.yaml +++ b/ansible/roles/vm_destroy/tasks/destroy.yaml @@ -31,16 +31,16 @@ # state: destroyed # name: "{{ vm_name }}" - - name: undefine (delete) the vm - community.libvirt.virt: - command: undefine - name: "{{ vm_name }}" - - name: delete the firmware vars file ansible.builtin.file: path: "{{ firmware_vhd_pool_dir }}/{{ vm_name }}_VARS.fd" state: absent + - name: undefine (delete) the vm + community.libvirt.virt: + command: undefine + name: "{{ vm_name }}" + - name: delete the root vhd when: delete_root_vhd ansible.builtin.file: