Ensure tasks are not skipped
- The lookup of the first file should only be skipped when necessary (the apt bits). - On the block/rescue: The rescue task didn't run, so if the when didn't trigger, no virt will be set, unless the ``cat /proc/cpuinfo`` failed. Change-Id: I6e89de1c9d1828003a83c5ca2b5b56d64c12f30c
This commit is contained in:
parent
33b2472724
commit
06af48b45b
@ -25,7 +25,8 @@
|
|||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Fail when virt type is unsupported
|
- name: Fail when virt type is unsupported
|
||||||
fail: msg="Unsupported Virt Type Provided {{ nova_supported_virt_types }}"
|
fail:
|
||||||
|
msg: "Unsupported Virt Type Provided {{ nova_supported_virt_types }}"
|
||||||
when:
|
when:
|
||||||
- nova_virt_type is defined
|
- nova_virt_type is defined
|
||||||
- nova_virt_type not in nova_supported_virt_types
|
- nova_virt_type not in nova_supported_virt_types
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- "nova_compute_{{ nova_virt_type }}.yml"
|
- "nova_compute_{{ nova_virt_type }}.yml"
|
||||||
skip: true
|
|
||||||
paths:
|
paths:
|
||||||
- "drivers/{{ nova_virt_type }}/"
|
- "drivers/{{ nova_virt_type }}/"
|
||||||
tags:
|
tags:
|
||||||
|
@ -153,13 +153,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ install_nova_role_packages.results }}"
|
- "{{ install_nova_role_packages.results }}"
|
||||||
|
|
||||||
- include: "{{ item }}"
|
- include: "consoles/nova_console_{{ nova_console_type }}_install.yml"
|
||||||
with_first_found:
|
|
||||||
- files:
|
|
||||||
- "nova_console_{{ nova_console_type }}_install.yml"
|
|
||||||
skip: true
|
|
||||||
paths:
|
|
||||||
- "consoles/"
|
|
||||||
when:
|
when:
|
||||||
- "'nova_console' in group_names"
|
- "'nova_console' in group_names"
|
||||||
tags:
|
tags:
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Only PowerVM needs to load a separate file. Skip for the others.
|
||||||
- include: "{{ item }}"
|
- include: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
|
@ -13,38 +13,38 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- block:
|
- name: Get CPU info content and store as var
|
||||||
- name: Get CPU info content and store as var
|
command: cat /proc/cpuinfo
|
||||||
command: cat /proc/cpuinfo
|
register: cpuinfo_contents
|
||||||
register: cpuinfo_contents
|
changed_when: false
|
||||||
changed_when: false
|
tags:
|
||||||
tags:
|
- always
|
||||||
- always
|
|
||||||
|
|
||||||
- name: Register a fact for the nova kvm virt type
|
- name: Register a fact for the nova qemu virt type
|
||||||
set_fact:
|
set_fact:
|
||||||
nova_virt_type: "kvm"
|
nova_virt_type: "qemu"
|
||||||
when: cpuinfo_contents.stdout.find('vmx') != -1
|
tags:
|
||||||
or cpuinfo_contents.stdout.find('svm') != -1
|
- always
|
||||||
or cpuinfo_contents.stdout.find('PowerNV') != -1
|
|
||||||
or (cpuinfo_contents.stdout.find('pSeries') != -1
|
|
||||||
and cpuinfo_contents.stdout.find('qemu') != -1
|
|
||||||
and ansible_architecture == 'ppc64le')
|
|
||||||
tags:
|
|
||||||
- nova-virt-type-set
|
|
||||||
|
|
||||||
- name: Register a fact for the nova powervm virt type
|
- name: Register a fact for the nova kvm virt type
|
||||||
set_fact:
|
set_fact:
|
||||||
nova_virt_type: "powervm"
|
nova_virt_type: "kvm"
|
||||||
when:
|
when:
|
||||||
- cpuinfo_contents.stdout.find('pSeries') != -1
|
- cpuinfo_contents.stdout.find('vmx') != -1
|
||||||
- ansible_architecture == 'ppc64le'
|
or cpuinfo_contents.stdout.find('svm') != -1
|
||||||
- cpuinfo_contents.stdout.find('qemu') == -1
|
or cpuinfo_contents.stdout.find('PowerNV') != -1
|
||||||
tags:
|
or (cpuinfo_contents.stdout.find('pSeries') != -1
|
||||||
- nova-virt-type-set
|
and cpuinfo_contents.stdout.find('qemu') != -1
|
||||||
rescue:
|
and ansible_architecture == 'ppc64le')
|
||||||
- name: Register a fact for the nova qemu virt type
|
tags:
|
||||||
set_fact:
|
- nova-virt-type-set
|
||||||
nova_virt_type: "qemu"
|
|
||||||
tags:
|
- name: Register a fact for the nova powervm virt type
|
||||||
- always
|
set_fact:
|
||||||
|
nova_virt_type: "powervm"
|
||||||
|
when:
|
||||||
|
- cpuinfo_contents.stdout.find('pSeries') != -1
|
||||||
|
- ansible_architecture == 'ppc64le'
|
||||||
|
- cpuinfo_contents.stdout.find('qemu') == -1
|
||||||
|
tags:
|
||||||
|
- nova-virt-type-set
|
||||||
|
Loading…
Reference in New Issue
Block a user