6b4f180a1e
Diskimage builder supports specifying a list of packages to install via -p. We currently support this for the root image, but not IPA images. This change adds a new configuration option, 'ipa_build_dib_packages', that should be a list of additional packages to install in locally built IPA images. This affects the following commands: kayobe seed deployment image build kayobe overcloud deployment image build This depends on https://github.com/stackhpc/ansible-role-os-images/pull/25. Also adds an example to the documentation for the equivalent option for root image. Change-Id: I04191d9541894b6a264e966c9ecb1056e0edade4 Story: 2006855 Task: 37446
46 lines
1.6 KiB
YAML
46 lines
1.6 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"
|
|
ipa_image_force_rebuild: false
|
|
tasks:
|
|
- block:
|
|
- 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_package_state: latest
|
|
os_images_upper_constraints_file: "{{ pip_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
|