kayobe/ansible/overcloud-ipa-build.yml
Rafal Lewandowski e10f176ce1 Add new DIB upper constraints variables
overcloud-dib: added overcloud_dib_dib_upper_constraints_file
ipa: added ipa_build_dib_upper_constraints_file
added os_images_dib_upper_constraints_file to image build
playbooks

New variables were added to facilitate control over the DIB
upper constraints without changing them for other components.
They are empty by default in order to facilitate Rocky9
image builds.

Change-Id: Ib50dd61685f13c60ace67213ddd1e714a80dece3
2022-09-13 11:23:58 +02:00

57 lines
2.1 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
gather_facts: False
tags:
- ipa-build
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_for_ipa_build_{{ kolla_enable_ironic | bool }}"
changed_when: false
- name: Ensure Ironic Python Agent images are built and installed
hosts: controllers_for_ipa_build_True[0]
tags:
- ipa-build
vars:
ipa_image_name: "ipa"
ipa_image_force_rebuild: false
tasks:
- block:
# TODO(priteau): Move this to stackhpc.os-images
- name: Ensure libgcrypt is updated
package:
name: "libgcrypt"
state: latest
become: True
when: ansible_facts.os_family == 'RedHat'
- name: Ensure Ironic Python Agent images are built
include_role:
name: stackhpc.os-images
vars:
os_images_package_dependencies_extra: "{{ ipa_build_dib_host_packages_extra | select | list }}"
os_images_venv: "{{ virtualenv_path }}/ipa-build-dib"
os_images_package_state: latest
os_images_upper_constraints_file: "{{ ipa_build_upper_constraints_file }}"
os_images_dib_upper_constraints_file: "{{ ipa_build_dib_upper_constraints_file }}"
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 }}"
packages: "{{ ipa_build_dib_packages }}"
# Avoid needing to install qemu-img for qcow2 image.
type: raw
os_images_git_elements: "{{ ipa_build_dib_git_elements }}"
os_images_upload: False
os_images_force_rebuild: "{{ ipa_image_force_rebuild }}"
when: ipa_build_images | bool