bc5f3aba90
When specifying tags with 'kayobe overcloud post configure --tags <tags>', the expected plays typically do not run. This seems to be due to an ansible bug, where if a dynamically created group is referenced before creation, it will remain empty. See https://github.com/ansible/ansible/issues/20360. This change works around this issue by modifying the name of the dynamic groups used in the post configure playbooks to be unique to each playbook. Fixes: #138 (cherry picked from commit 77a41a9d0a37acd2d4c25bd7d969d965a9552428) Change-Id: I7a884f538cfeba9d6b4b990ec445b5ad6f914193
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
# Build and install an Ironic Python Agent (IPA) image for the overcloud's
|
|
# ironic and ironic-inspector services.
|
|
#
|
|
# The images will be stored in {{ image_cache_path }}/{{ ipa_image_name }}.
|
|
|
|
- name: Check whether Ironic is enabled
|
|
hosts: controllers
|
|
tags:
|
|
- ipa-build
|
|
tasks:
|
|
- name: Create controllers group with ironic enabled
|
|
group_by:
|
|
key: "controllers_for_ipa_build_{{ kolla_enable_ironic | bool }}"
|
|
|
|
- name: Ensure Ironic Python Agent images are built and installed
|
|
hosts: controllers_for_ipa_build_True[0]
|
|
gather_facts: False
|
|
tags:
|
|
- ipa-build
|
|
vars:
|
|
ipa_image_name: "ipa"
|
|
tasks:
|
|
- name: Ensure Ironic Python Agent images are built
|
|
include_role:
|
|
name: stackhpc.os-images
|
|
vars:
|
|
os_images_venv: "{{ virtualenv_path }}/ipa-build-dib"
|
|
os_images_cache: "{{ image_cache_path }}"
|
|
os_images_common: ""
|
|
os_images_list:
|
|
- name: "{{ ipa_image_name }}"
|
|
elements: "{{ ipa_build_dib_elements }}"
|
|
env: "{{ ipa_build_dib_env }}"
|
|
# Avoid needing to install qemu-img for qcow2 image.
|
|
type: raw
|
|
os_images_git_elements: "{{ ipa_build_dib_git_elements }}"
|
|
os_images_upload: False
|
|
when: ipa_build_images | bool
|