From 13d5177ce4563c7a0a7f0bb42c88f7c20bf18893 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 7 Jan 2020 18:10:17 +0000 Subject: [PATCH] virt_instance_create: drop duplicate facts dropping and add a new task to gather at the end. Signed-off-by: Kevin Fenzi --- tasks/virt_instance_create.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index 78bbb89bb0..8fe27d474b 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -35,13 +35,6 @@ 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}}" @@ -156,3 +149,10 @@ - /etc/ssh/ssh_known_hosts when: inventory_hostname not in result.list_vms and inventory_hostname in groups['osbs_masters']+groups['osbs_nodes'] delegate_to: osbs-control01.phx2.fedoraproject.org + +- name: gather facts + setup: + check_mode: no + ignore_errors: True + register: facts + when: inventory_hostname not in result.list_vms