From 9d1e6bf031ff971371516a94eb536e72d5e28c45 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 20 Nov 2019 03:20:42 +0000 Subject: [PATCH] virt_instance_create: make sure to wipe the facts cache if we are (re)installing the guest Signed-off-by: Kevin Fenzi --- tasks/virt_instance_create.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index 322b1ad9de..a3420ec4d0 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -33,6 +33,13 @@ delay: 20 when: inventory_hostname not in result.list_vms +- name: nuke the facts cache for this hosts/host + file: + path: /root/.ansible_facts_cache/{{ inventory_hostname }} + state: absent + delegate_to: localhost + when: inventory_hostname not in result.list_vms + - name: ARMv7 copy the kernel out shell: "virt-builder --get-kernel {{ volgroup }}/{{ inventory_hostname }} --output /var/lib/libvirt/images/ | awk -F/ '{print $NF}' > /var/lib/libvirt/images/{{ inventory_hostname }}-details.txt" delegate_to: "{{ vmhost}}"