
The group variables originally in ansible/group_vars/ were playbook group variables, due to being adjacent to the playbooks. Typically they provided default values for global variables in the all group, as well as some more specific groups. This has worked fairly well, but results in (at least) a couple of problems. 1. The default variable precedence rules mean that these playbook group variables have a higher precedence than inventory group variables (for a given group). This can make it challenging to override playbook group variables in the inventory in Kayobe configuration. 2. Any playbook run by Kayobe must be in the same directory as the playbook group variables in order to use them. Given that they include variables required for connectivity such as ansible_host and ansible_user, this is quite critical. For Kayobe custom playbooks, we work around this by symlinking to the group_vars directory from the directory containing the custom playbook. This is not an elegant workaround, and has assumptions about the relative paths of the Kayobe configuration and virtual environment in which Kayobe is installed. Story: 2010280 Task: 46233 Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
96 lines
4.4 KiB
Plaintext
96 lines
4.4 KiB
Plaintext
---
|
|
# Overcloud host disk image configuration.
|
|
|
|
###############################################################################
|
|
# Diskimage-builder configuration for overcloud host disk images.
|
|
|
|
# Whether to build host disk images with DIB directly instead of through
|
|
# Bifrost. Setting it to true disables Bifrost image build and allows images to
|
|
# be built with the `kayobe overcloud host image build` command. Default value
|
|
# is {{ os_distribution == 'rocky' }}. This will change in a future release.
|
|
overcloud_dib_build_host_images: "{{ os_distribution == 'rocky' }}"
|
|
|
|
# List of additional build host packages to install.
|
|
overcloud_dib_host_packages_extra: []
|
|
|
|
# List of overcloud host disk images to build. Each element is a dict defining
|
|
# an image in a format accepted by the stackhpc.os-images role. Default is to
|
|
# build an image named "deployment_image" configured with the overcloud_dib_*
|
|
# variables defined below: {"name": "deployment_image", "elements": "{{
|
|
# overcloud_dib_elements }}", "env": "{{ overcloud_dib_env_vars }}",
|
|
# "packages": "{{ overcloud_dib_packages }}"}.
|
|
overcloud_dib_host_images:
|
|
- name: "deployment_image"
|
|
elements: "{{ overcloud_dib_elements }}"
|
|
env: "{{ overcloud_dib_env_vars }}"
|
|
packages: "{{ overcloud_dib_packages }}"
|
|
|
|
# DIB base OS element. Default is {{ 'rocky-container' if os_distribution ==
|
|
# 'rocky' else os_distribution }}.
|
|
overcloud_dib_os_element: "{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}"
|
|
|
|
# DIB image OS release. Default is {{ os_release }}.
|
|
overcloud_dib_os_release: "{{ os_release }}"
|
|
|
|
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
|
|
# "disable-selinux", "enable-serial-console", "vm"] when
|
|
# overcloud_dib_os_element is "centos", or ["rocky-container",
|
|
# "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
|
|
# when overcloud_dib_os_element is "rocky" or
|
|
# ["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
|
|
# when overcloud_dib_os_element is "ubuntu".
|
|
overcloud_dib_elements_default:
|
|
- "{{ overcloud_dib_os_element }}"
|
|
- "cloud-init-datasources"
|
|
- "{% if overcloud_dib_os_element in ['centos', 'rocky'] %}disable-selinux{% endif %}"
|
|
- "enable-serial-console"
|
|
- "vm"
|
|
|
|
# List of additional DIB elements. Default is none.
|
|
overcloud_dib_elements_extra: []
|
|
|
|
# List of DIB elements. Default is a combination of
|
|
# overcloud_dib_elements_default and overcloud_dib_elements_extra.
|
|
overcloud_dib_elements: "{{ overcloud_dib_elements_default | select | list + overcloud_dib_elements_extra }}"
|
|
|
|
# DIB default environment variables. Default is
|
|
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
|
|
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
|
|
# "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
|
|
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
|
|
overcloud_dib_env_vars_default:
|
|
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1"
|
|
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
|
|
DIB_CONTAINERFILE_RUNTIME: "docker"
|
|
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
|
|
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
|
|
|
|
# DIB additional environment variables. Default is none.
|
|
overcloud_dib_env_vars_extra: {}
|
|
|
|
# DIB environment variables. Default is combination of
|
|
# overcloud_dib_env_vars_default and overcloud_dib_env_vars_extra.
|
|
overcloud_dib_env_vars: "{{ overcloud_dib_env_vars_default | combine(overcloud_dib_env_vars_extra) }}"
|
|
|
|
# List of DIB packages to install. Default is to install no extra packages.
|
|
overcloud_dib_packages: []
|
|
|
|
# List of default git repositories containing Diskimage Builder (DIB) elements.
|
|
# See stackhpc.os-images role for usage. Default is empty.
|
|
overcloud_dib_git_elements_default: []
|
|
|
|
# List of additional git repositories containing Diskimage Builder (DIB)
|
|
# elements. See stackhpc.os-images role for usage. Default is empty.
|
|
overcloud_dib_git_elements_extra: []
|
|
|
|
# List of git repositories containing Diskimage Builder (DIB) elements. See
|
|
# stackhpc.os-images role for usage. Default is a combination of
|
|
# overcloud_dib_git_elements_default and overcloud_dib_git_elements_extra.
|
|
overcloud_dib_git_elements: >-
|
|
{{ overcloud_dib_git_elements_default + overcloud_dib_git_elements_extra }}
|
|
|
|
# Upper constraints file for installing packages in the virtual environment
|
|
# used for building overcloud host disk images. Default is {{
|
|
# pip_upper_constraints_file }}.
|
|
overcloud_dib_upper_constraints_file: "{{ pip_upper_constraints_file }}"
|