Avoid including nova_virt_detect if nova_virt_type is set
There's no need for us to actually run through that entire set of tasks if the value is specified already. Change-Id: I6f3503fdfbe8fa43334da4360827078cd450ffcd
This commit is contained in:
parent
96b1500fe6
commit
135f7bf364
@ -70,6 +70,8 @@
|
|||||||
- always
|
- always
|
||||||
|
|
||||||
- include_tasks: nova_virt_detect.yml
|
- include_tasks: nova_virt_detect.yml
|
||||||
|
when:
|
||||||
|
- nova_virt_type is not defined
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
- nova-config
|
- nova-config
|
||||||
|
@ -17,14 +17,11 @@
|
|||||||
command: cat /proc/cpuinfo
|
command: cat /proc/cpuinfo
|
||||||
register: cpuinfo_contents
|
register: cpuinfo_contents
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
|
||||||
- nova_virt_type is not defined
|
|
||||||
|
|
||||||
- name: Register a fact for the nova kvm virt type
|
- name: Register a fact for the nova kvm virt type
|
||||||
set_fact:
|
set_fact:
|
||||||
nova_virt_type: "kvm"
|
nova_virt_type: "kvm"
|
||||||
when:
|
when:
|
||||||
- nova_virt_type is not defined
|
|
||||||
- cpuinfo_contents.stdout.find('vmx') != -1
|
- cpuinfo_contents.stdout.find('vmx') != -1
|
||||||
or cpuinfo_contents.stdout.find('svm') != -1
|
or cpuinfo_contents.stdout.find('svm') != -1
|
||||||
or cpuinfo_contents.stdout.find('PowerNV') != -1
|
or cpuinfo_contents.stdout.find('PowerNV') != -1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user