kayobe/ansible/overcloud-host-image-build.yml
Will Szumski 988a822259 Add podman support
Adds support for Podman as an alternative container engine. This builds
on the support added in kolla-ansible in the 2023.2 cycle.

Change-Id: I2c6befbdda7e684228065103feea7250a0ea3826
2025-01-27 16:42:33 +00:00

47 lines
2.1 KiB
YAML

---
# Build and install overcloud host disk images for the seed host's ironic
# service.
- name: Ensure overcloud host disk images are built and installed
hosts: seed
tags:
- overcloud-host-image-build
vars:
overcloud_host_image_force_rebuild: False
tasks:
- block:
- name: Validate overcloud host disk image configuration
assert:
that:
- overcloud_dib_host_images is sequence
- overcloud_dib_host_images | selectattr('name', 'undefined') | list | length == 0
- overcloud_dib_host_images | selectattr('elements', 'undefined') | list | length == 0
msg: "overcloud_dib_host_images set to invalid value"
- name: Ensure overcloud host disk images are built
include_role:
name: stackhpc.openstack.os_images
vars:
os_images_package_dependencies_extra: "{{ overcloud_dib_host_packages_extra | select | list }}"
os_images_venv: "{{ virtualenv_path }}/overcloud-host-image-dib"
os_images_package_state: latest
os_images_upper_constraints_file: "{{ overcloud_dib_upper_constraints_file }}"
os_images_dib_upper_constraints_file: "{{ overcloud_dib_dib_upper_constraints_file }}"
os_images_cache: "{{ image_cache_path }}"
os_images_common: ""
os_images_list: "{{ overcloud_dib_host_images }}"
os_images_git_elements: "{{ overcloud_dib_git_elements }}"
os_images_upload: False
os_images_force_rebuild: "{{ overcloud_host_image_force_rebuild }}"
- name: Copy overcloud host disk images into /httpboot
copy:
src: "{{ image_cache_path }}/{{ image.name }}/{{ image.name }}.{{ image.type | default('qcow2') }}"
dest: "{{ container_engine_volumes_path }}/bifrost_httpboot/_data/{{ image.name }}.{{ image.type | default('qcow2') }}"
remote_src: True
with_items: "{{ overcloud_dib_host_images }}"
loop_control:
loop_var: image
become: True
when: overcloud_dib_build_host_images | bool