virt_instance_create: make sure to wipe the facts cache if we are (re)installing the guest

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2019-11-20 03:20:42 +00:00 committed by Pierre-Yves Chibon
parent a23c67ecb6
commit 9d1e6bf031

View file

@ -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}}"