diff options
Diffstat (limited to 'roles/kolla-build-config/templates/kolla-build.conf.j2')
| -rw-r--r-- | roles/kolla-build-config/templates/kolla-build.conf.j2 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/kolla-build-config/templates/kolla-build.conf.j2 b/roles/kolla-build-config/templates/kolla-build.conf.j2 new file mode 100644 index 000000000..bfc5dd426 --- /dev/null +++ b/roles/kolla-build-config/templates/kolla-build.conf.j2 @@ -0,0 +1,27 @@ +{# Generate requested sections and options #} + +{% for section_name, section in kolla_build_config.items() %} +[{{ section_name }}] +{% for option_name, option in section.items() %} +{{ option_name }} = {{ option }} +{% endfor %} +{% endfor %} + +{# Generate a section for every build source for which there is a Zuul change. #} + +{% for zuul_item in zuul['items'] %} +{% if zuul_item.project.name in kolla_build_sources %} +{% set source_names = kolla_build_sources[zuul_item.project.name] %} +{% if source_names is string %} +[{{ source_names }}] +type = local +location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }} +{% else %} +{% for source_name in source_names %} +[{{ source_name }}] +type = local +location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }} +{% endfor %} +{% endif %} +{% endif %} +{% endfor %} |
