diff --git a/ansible/group_vars/all/inspector b/ansible/group_vars/all/inspector index 463f22ed22cbeee6eeceb18dfe183640d9cd82fe..422f5971a7fffbfe95cca24b62084e35f1894483 100644 --- a/ansible/group_vars/all/inspector +++ b/ansible/group_vars/all/inspector @@ -323,7 +323,7 @@ inspector_dell_switch_lldp_workaround_group: # data which may be useful in environments without Swift. # Whether the inspection data store is enabled. -inspector_store_enabled: "{{ not kolla_enable_swift | bool }}" +inspector_store_enabled: "{{ kolla_enable_ironic | bool and not kolla_enable_swift | bool }}" # Port on which the inspection data store should listen. inspector_store_port: 8080 diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index 71c5765b5ac77c28ff085ce70c87f555ba617b24..5045a1a7640f98da6f2645803755912722f12e9c 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -1,6 +1,6 @@ --- -- name: Ensure Ironic is enabled +- name: Check whether Ironic is enabled hosts: controllers tasks: - name: Create controllers group with ironic enabled @@ -146,17 +146,19 @@ }} with_items: "{{ kolla_neutron_ml2_generic_switch_hosts }}" - - name: Set facts containing IPA kernel and ramdisk URLs - set_fact: - kolla_inspector_ipa_kernel_upstream_url: "{{ inspector_ipa_kernel_upstream_url }}" - kolla_inspector_ipa_ramdisk_upstream_url: "{{ inspector_ipa_ramdisk_upstream_url }}" - when: not ipa_build_images | bool + - block: + - name: Set facts containing IPA kernel and ramdisk URLs + set_fact: + kolla_inspector_ipa_kernel_upstream_url: "{{ inspector_ipa_kernel_upstream_url }}" + kolla_inspector_ipa_ramdisk_upstream_url: "{{ inspector_ipa_ramdisk_upstream_url }}" + when: not ipa_build_images | bool - - name: Set facts containing IPA kernel and ramdisk paths - set_fact: - kolla_inspector_ipa_kernel_path: "{{ image_cache_path }}/{{ ipa_image_name }}/{{ ipa_images_kernel_name }}" - kolla_inspector_ipa_ramdisk_path: "{{ image_cache_path }}/{{ ipa_image_name }}/{{ ipa_images_ramdisk_name }}" - when: ipa_build_images | bool + - name: Set facts containing IPA kernel and ramdisk paths + set_fact: + kolla_inspector_ipa_kernel_path: "{{ image_cache_path }}/{{ ipa_image_name }}/{{ ipa_images_kernel_name }}" + kolla_inspector_ipa_ramdisk_path: "{{ image_cache_path }}/{{ ipa_image_name }}/{{ ipa_images_ramdisk_name }}" + when: ipa_build_images | bool + when: kolla_enable_ironic | bool tags: - config roles: diff --git a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml index 3d369433cb8a58a805e010db79bfc5ae892ad52c..ac44d5010bcfd2cee725bdf2b793b53ac0c21099 100644 --- a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml +++ b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml @@ -8,8 +8,16 @@ # each ironic node that matches against the switch system and the relevant # interface name, then sets the node's name appropriately. -- name: Group controller hosts in systems requiring the workaround +- name: Check whether Ironic is enabled hosts: controllers + tasks: + - name: Create controllers group with ironic enabled + group_by: + key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}" + +- name: Group controller hosts in systems requiring the workaround + hosts: controllers_with_ironic_enabled_True + gather_facts: False tasks: - name: Group controller hosts in systems requiring the Dell switch LLDP workaround group_by: @@ -18,6 +26,7 @@ - name: Ensure introspection rules for Dell switch LLDP workarounds are registered in Ironic Inspector # Only required to run on a single host. hosts: controllers_require_workaround_True[0] + gather_facts: False vars: all_switch_interfaces: [] ironic_inspector_rules: [] diff --git a/ansible/overcloud-introspection-rules.yml b/ansible/overcloud-introspection-rules.yml index bbb88e8b70395e8620f19ac90fd3b832debf91a0..502373e150ec978628092fd993b1d22b7ba63c69 100644 --- a/ansible/overcloud-introspection-rules.yml +++ b/ansible/overcloud-introspection-rules.yml @@ -1,7 +1,15 @@ --- +- name: Check whether Ironic is enabled + hosts: controllers + tasks: + - name: Create controllers group with ironic enabled + group_by: + key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}" + - name: Ensure introspection rules are registered in Ironic Inspector # Only required to run on a single host. - hosts: controllers[0] + hosts: controllers_with_ironic_enabled_True[0] + gather_facts: False vars: venv: "{{ virtualenv_path }}/shade" pre_tasks: diff --git a/ansible/overcloud-ipa-build.yml b/ansible/overcloud-ipa-build.yml index ab38300a1c165c09660620b0c46c86b26d7d8740..587a8b46e0a50bbb963beccff38acc17f0bd65bf 100644 --- a/ansible/overcloud-ipa-build.yml +++ b/ansible/overcloud-ipa-build.yml @@ -4,8 +4,16 @@ # # The images will be stored in {{ image_cache_path }}/{{ ipa_image_name }}. +- name: Check whether Ironic is enabled + hosts: controllers + tasks: + - name: Create controllers group with ironic enabled + group_by: + key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}" + - name: Ensure Ironic Python Agent images are built and installed - hosts: controllers[0] + hosts: controllers_with_ironic_enabled_True[0] + gather_facts: False vars: ipa_image_name: "ipa" tasks: diff --git a/ansible/overcloud-ipa-images.yml b/ansible/overcloud-ipa-images.yml index 7d59fb15cd3c96880cacd222a6724ec3b85e1112..488ea66c7a554195ace95eef1724920d7615123c 100644 --- a/ansible/overcloud-ipa-images.yml +++ b/ansible/overcloud-ipa-images.yml @@ -1,6 +1,14 @@ --- +- name: Check whether Ironic is enabled + hosts: controllers + tasks: + - name: Create controllers group with ironic enabled + group_by: + key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}" + - name: Ensure Ironic Python Agent (IPA) images are downloaded and registered - hosts: controllers[0] + hosts: controllers_with_ironic_enabled_True[0] + gather_facts: False vars: # These are the filenames generated by overcloud-ipa-build.yml. ipa_image_name: "ipa" diff --git a/ansible/provision-net.yml b/ansible/provision-net.yml index aceb1417119e057baf5251a45d4399a95b56ec7c..7fe844217b54bcad57d6e2791ec4a6b28c82ba95 100644 --- a/ansible/provision-net.yml +++ b/ansible/provision-net.yml @@ -1,7 +1,15 @@ --- +- name: Check whether Ironic is enabled + hosts: controllers + tasks: + - name: Create controllers group with ironic enabled + group_by: + key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}" + - name: Ensure provisioning network and subnet are registered in neutron # Only required to run on a single host. - hosts: controllers[0] + hosts: controllers_with_ironic_enabled_True[0] + gather_facts: False pre_tasks: - name: Validate OpenStack password authentication parameters fail: