From 61c40a7800a4d1b469832b7dfabf00b3072442b6 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 23 Sep 2019 19:14:41 -0400 Subject: [PATCH] Adapt ContainerImagePrepareDebug to the string pattern Like other *Debug parameters, make it so we first look for ContainerImagePrepareDebug to be set, otherwise we fallback to Debug; like we already do in all other OpenStack services. Related-Bug: #1850934 Change-Id: I0f18b475c69a8ba71b06f517e87caf0d5c209fbb (cherry picked from commit 1d11972b10b8154d2e4a34c233a7c7c66048f0a9) --- ...ntainer-image-prepare-baremetal-ansible.j2.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml b/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml index e667aa0139..71bb943a17 100644 --- a/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml +++ b/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml @@ -60,7 +60,9 @@ parameters: ContainerImagePrepareDebug: default: false description: Whether or not we want to activate --debug in tripleo container image prepare. - type: boolean + type: string + constraints: + - allowed_values: [ '', 'true', 'True', 'TRUE', 'false', 'False', 'FALSE'] ContainerImageRegistryCredentials: type: json hidden: true @@ -87,6 +89,10 @@ parameters: default: {{role.CountDefault|default(0)}} {% endfor %} +conditions: + + service_debug_unset: {equals : [{get_param: ContainerImagePrepareDebug}, '']} + outputs: role_data: description: Role data for container image prepare @@ -99,7 +105,11 @@ outputs: block: - set_fact: log_file: {get_param: ContainerImagePrepareLogFile} - container_image_prepare_debug: {get_param: ContainerImagePrepareDebug} + container_image_prepare_debug: + if: + - service_debug_unset + - {get_param: Debug } + - {get_param: ContainerImagePrepareDebug } - name: Create temp file for prepare parameter tempfile: state: file