Use jinja for image build conditionals
This change converts a bash if/elif/else to jinja, since the variable used in the expression comes from ansible. The rendered bash should be as clean and understandable as possible, inserting jinja variables into bash expressions doesn't help in this case. Change-Id: Iccd58eea9fa2d5538b6ac45a9dc92d82d725edd1 Blueprint: whole-disk-default
This commit is contained in:
parent
9d1f1faabc
commit
1bf01e4e0d
|
@ -20,19 +20,19 @@ export ELEMENTS_PATH=$ELEMENTS
|
|||
{% endif %}
|
||||
|
||||
# the tripleo_image_type is set and passed from the ci job definition
|
||||
if [ "{{ tripleo_image_type }}" == "overcloud-hardened-uefi-full" ]; then
|
||||
CONFIG_FILES="--config-file \
|
||||
{% if tripleo_image_type == "overcloud-hardened-uefi-full" %}
|
||||
CONFIG_FILES="--config-file \
|
||||
{{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-python3.yaml \
|
||||
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-{{ tripleo_image_os }}.yaml"
|
||||
elif [ "{{ tripleo_image_type }}" == "overcloud-hardened-full" ]; then
|
||||
CONFIG_FILES="--config-file \
|
||||
{% elif tripleo_image_type == "overcloud-hardened-full" %}
|
||||
CONFIG_FILES="--config-file \
|
||||
{{ tripleo_common_path }}/image-yaml/{{ hardened_image_config[python_v] }} \
|
||||
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-{{ tripleo_image_os }}.yaml"
|
||||
else
|
||||
CONFIG_FILES="--config-file \
|
||||
{% else %}
|
||||
CONFIG_FILES="--config-file \
|
||||
{{ tripleo_common_path }}/image-yaml/{{ base_image_config[python_v] }} \
|
||||
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-images-{{ tripleo_image_os }}.yaml"
|
||||
fi
|
||||
{% endif %}
|
||||
|
||||
{% if dib_local_image is defined %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue