From 5199c89a043084a62d35010d5909bef34d437454 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Tue, 23 Feb 2021 17:35:28 +0000 Subject: [PATCH] Cleanup old facts before starting installer --- playbooks/include/deploy-kvm-guest.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbooks/include/deploy-kvm-guest.yml b/playbooks/include/deploy-kvm-guest.yml index a8fda29..9a030bf 100644 --- a/playbooks/include/deploy-kvm-guest.yml +++ b/playbooks/include/deploy-kvm-guest.yml @@ -44,6 +44,13 @@ register: result check_mode: false + - name: clean up old facts cache + file: + path: "{{ ansible_dir_root }}/facts/{{ inventory_hostname }}" + state: absent + delegate_to: localhost + when: inventory_hostname not in result.list_vms + - name: create temp directory tempfile: state: directory