Add new variables for customising the deployment image in Bifrost

Add new variables, ``kolla_bifrost_dib_elements_extra`` and
``kolla_bifrost_dib_env_vars_extra``, in
``${KAYOBE_CONFIG_PATH}/bifrost.yml`` for setting additional
``diskimage-builder`` elements and environment variables for the disk
image generated by Bifrost. Default elements and environment variables
are now respectively defined by ``kolla_bifrost_dib_elements_default``
and ``kolla_bifrost_dib_env_vars_default``.

Change-Id: I22ab15c42d8db772f1a64f325f9371860491ccfb
This commit is contained in:
Pierre Riteau 2019-10-23 22:13:02 +02:00
parent a34065233f
commit 461b941329
3 changed files with 47 additions and 4 deletions

View File

@ -20,19 +20,31 @@ kolla_bifrost_dib_os_element: "centos7"
# DIB image OS release. # DIB image OS release.
kolla_bifrost_dib_os_release: "GenericCloud" kolla_bifrost_dib_os_release: "GenericCloud"
# List of DIB elements. # List of default DIB elements.
kolla_bifrost_dib_elements: kolla_bifrost_dib_elements_default:
- "disable-selinux" - "disable-selinux"
- "enable-serial-console" - "enable-serial-console"
- "vm" - "vm"
# List of additional DIB elements.
kolla_bifrost_dib_elements_extra: []
# List of all DIB elements.
kolla_bifrost_dib_elements: "{{ kolla_bifrost_dib_elements_default + kolla_bifrost_dib_elements_extra }}"
# DIB init element. # DIB init element.
kolla_bifrost_dib_init_element: "cloud-init-datasources" kolla_bifrost_dib_init_element: "cloud-init-datasources"
# DIB environment variables. # DIB default environment variables.
kolla_bifrost_dib_env_vars: kolla_bifrost_dib_env_vars_default:
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
# DIB additional environment variables.
kolla_bifrost_dib_env_vars_extra: {}
# DIB environment variables.
kolla_bifrost_dib_env_vars: "{{ kolla_bifrost_dib_env_vars_default | combine(kolla_bifrost_dib_env_vars_extra) }}"
# List of DIB packages to install. # List of DIB packages to install.
kolla_bifrost_dib_packages: [] kolla_bifrost_dib_packages: []

View File

@ -20,12 +20,24 @@
# DIB image OS release. # DIB image OS release.
#kolla_bifrost_dib_os_release: #kolla_bifrost_dib_os_release:
# List of default DIB elements.
#kolla_bifrost_dib_elements_default:
# List of additional DIB elements.
#kolla_bifrost_dib_elements_extra:
# List of DIB elements. # List of DIB elements.
#kolla_bifrost_dib_elements: #kolla_bifrost_dib_elements:
# DIB init element. # DIB init element.
#kolla_bifrost_dib_init_element: #kolla_bifrost_dib_init_element:
# DIB default environment variables.
#kolla_bifrost_dib_env_vars_default:
# DIB additional environment variables.
#kolla_bifrost_dib_env_vars_extra:
# DIB environment variables. # DIB environment variables.
#kolla_bifrost_dib_env_vars: #kolla_bifrost_dib_env_vars:

View File

@ -0,0 +1,19 @@
---
features:
- |
Adds new variables, ``kolla_bifrost_dib_elements_extra`` and
``kolla_bifrost_dib_env_vars_extra``, in
``${KAYOBE_CONFIG_PATH}/bifrost.yml`` for setting additional
``diskimage-builder`` elements and environment variables for the disk image
generated by Bifrost. Default elements and environment variables are now
respectively defined by ``kolla_bifrost_dib_elements_default`` and
``kolla_bifrost_dib_env_vars_default``.
upgrade:
- |
It is now possible to set additional ``diskimage-builder`` elements and
environment variables for the disk image generated by Bifrost, while
keeping defaults set by Kayobe. If your configuration overrides
``kolla_bifrost_dib_elements`` or ``kolla_bifrost_dib_env_vars`` while
still including default values set in ``ansible/group_vars/all/bifrost``,
you can move your additions to ``kolla_bifrost_dib_elements_extra`` and
``kolla_bifrost_dib_env_vars_extra`` instead.