Merge "Introduce ContainerImagePrepareDebug parameter"

This commit is contained in:
Zuul 2019-02-16 05:27:57 +00:00 committed by Gerrit Code Review
commit afe1cb5581
3 changed files with 23 additions and 1 deletions

View File

@ -57,6 +57,10 @@ parameters:
description: Optional. Mirror to use for registry docker.io
default: ''
type: string
ContainerImagePrepareDebug:
default: false
description: Whether or not we want to activate --debug in tripleo container image prepare.
type: boolean
{% for role in roles %}
# Parameters generated for {{role.name}} Role
@ -84,6 +88,7 @@ outputs:
block:
- set_fact:
log_file: {get_param: ContainerImagePrepareLogFile}
container_image_prepare_debug: {get_param: ContainerImagePrepareDebug}
- name: Create temp file for prepare parameter
tempfile:
state: file
@ -114,7 +119,13 @@ outputs:
dest: "{{ '{{' }} role_data.path {{ '}}' }}"
content: {{ roles }}
- name: Run tripleo-container-image-prepare logged to {{ '{{' }} log_file {{ '}}' }}
shell: sudo /usr/bin/tripleo-container-image-prepare --roles-file {{ '{{' }} role_data.path {{ '}}' }} --environment-file {{ '{{' }} prepare_param.path {{ '}}' }} --cleanup partial --log-file {{ '{{' }} log_file {{ '}}' }}
shell: |
sudo /usr/bin/tripleo-container-image-prepare \
--roles-file {{ '{{' }} role_data.path {{ '}}' }} \
--environment-file {{ '{{' }} prepare_param.path {{ '}}' }} \
--cleanup partial \
--log-file {{ '{{' }} log_file {{ '}}' }}{{ '{' }}% if container_image_prepare_debug|default(false) %{{ '}' }} \
--debug{{ '{' }}% endif %{{ '}' }}
no_log: True
- name: Delete param file
file:

View File

@ -0,0 +1,5 @@
# A Heat environment file which can be used to enable container image prepare
# debugging
parameter_defaults:
ContainerImagePrepareDebug: true

View File

@ -0,0 +1,6 @@
---
features:
- |
ContainerImagePrepareDebug is a parameter that allows to run the tripleo
container image prepare command with --debug. It is set to 'False' by default
for backward compatibility.