Add support for free-form configuration of kolla-build.conf
Provide extra configuration of kolla-build.conf via $KAYOBE_CONFIG_PATH/kolla/kolla-build.conf.
This commit is contained in:
parent
d130b8a62c
commit
6c4f179b6e
@ -4,3 +4,4 @@
|
||||
roles:
|
||||
- role: kolla
|
||||
- role: kolla-build
|
||||
kolla_build_extra_config_path: "{{ kayobe_config_path }}/kolla/kolla-build.conf"
|
||||
|
@ -2,6 +2,9 @@
|
||||
# Directory where Kolla config files will be installed.
|
||||
kolla_build_config_path:
|
||||
|
||||
# Path to extra kolla configuration files.
|
||||
kolla_build_extra_config_path:
|
||||
|
||||
# Valid options are [ centos, fedora, oraclelinux, ubuntu ]
|
||||
kolla_base_distro:
|
||||
|
||||
@ -34,3 +37,6 @@ kolla_build_blocks: {}
|
||||
# most commonly packages. The operation should be one of override, append or
|
||||
# remove. The value should be a list.
|
||||
kolla_build_customizations: {}
|
||||
|
||||
# Free-form extra configuration for kolla-build.
|
||||
kolla_extra_build: {}
|
||||
|
@ -1,4 +1,18 @@
|
||||
---
|
||||
- name: Check whether a Kolla build extra configuration file exists
|
||||
local_action:
|
||||
module: stat
|
||||
path: "{{ kolla_build_extra_config_path }}"
|
||||
get_checksum: False
|
||||
get_md5: False
|
||||
mime: False
|
||||
register: stat_result
|
||||
|
||||
- name: Set a fact containing extra configuration
|
||||
set_fact:
|
||||
kolla_build_extra_config: "{{ lookup('template', kolla_build_extra_config_path) }}"
|
||||
when: stat_result.stat.exists
|
||||
|
||||
- name: Ensure the Kolla build configuration files exist
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
|
@ -33,3 +33,11 @@ reference = {{ source_def.reference }}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if kolla_build_extra_config is defined %}
|
||||
#######################
|
||||
# Extra configuration
|
||||
#######################
|
||||
|
||||
{{ kolla_build_extra_config }}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user