diff --git a/tasks/main.yml b/tasks/main.yml index 14586874..03cf617b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -70,6 +70,8 @@ - always - include_tasks: nova_virt_detect.yml + when: + - nova_virt_type is not defined tags: - always - nova-config diff --git a/tasks/nova_virt_detect.yml b/tasks/nova_virt_detect.yml index 81d29d90..11ed0e2b 100644 --- a/tasks/nova_virt_detect.yml +++ b/tasks/nova_virt_detect.yml @@ -17,14 +17,11 @@ command: cat /proc/cpuinfo register: cpuinfo_contents changed_when: false - when: - - nova_virt_type is not defined - name: Register a fact for the nova kvm virt type set_fact: nova_virt_type: "kvm" when: - - nova_virt_type is not defined - cpuinfo_contents.stdout.find('vmx') != -1 or cpuinfo_contents.stdout.find('svm') != -1 or cpuinfo_contents.stdout.find('PowerNV') != -1