Add support for configuration of Jinja2 blocks in kolla images

This commit is contained in:
Mark Goddard 2017-03-30 11:07:58 +01:00
parent 58e1dd8fe0
commit 453cbda541
4 changed files with 19 additions and 0 deletions

View File

@ -131,6 +131,9 @@ controller_container_image_regexes: "{{ controller_container_image_regex_map | s
controller_container_image_sets:
- regexes: "{{ controller_container_image_regexes | join(' ') }}"
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
kolla_build_blocks: {}
###############################################################################
# Kolla-ansible configuration.

View File

@ -23,3 +23,6 @@ kolla_openstack_release:
# location: https://github.com/openstack/ironic
# reference: master
kolla_sources: {}
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
kolla_build_blocks: {}

View File

@ -3,3 +3,10 @@
{% raw %}
{% extends parent_template %}
{% endraw %}
{% for block_name, block_contents in kolla_build_blocks.items() %}
{{ '{% block ' ~ block_name ~ ' %}' }}
{{ block_contents }}
{{ '{% endblock %}' }}
{% endfor %}

View File

@ -49,6 +49,12 @@
# reference: master
#kolla_sources:
###############################################################################
# Kolla image build configuration.
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
#kolla_build_blocks:
###############################################################################
# Kolla-ansible configuration.