Merge "Honor Debug for container image prepare" into stable/stein

This commit is contained in:
Zuul 2019-11-02 03:23:30 +00:00 committed by Gerrit Code Review
commit 83bd596e6f
1 changed files with 14 additions and 4 deletions

View File

@ -57,8 +57,12 @@ parameters:
description: Optional. Mirror to use for registry docker.io
default: ''
type: string
ContainerImagePrepareDebug:
Debug:
default: false
description: Set to True to enable debugging on all services.
type: boolean
ContainerImagePrepareDebug:
default: ''
description: Whether or not we want to activate --debug in tripleo container image prepare.
type: string
constraints:
@ -140,15 +144,21 @@ outputs:
copy:
dest: "{{ '{{' }} role_data.path {{ '}}' }}"
content: {{ roles }}
- name: debuging something
debug:
msg: |
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 %{{ '}' }}
- 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 {{ '}}' }}{{ '{' }}% if container_image_prepare_debug|default(false) %{{ '}' }} \
--debug > {{ '{{' }} log_file {{ '}}' }} 2>&1{{ '{' }}% endif %{{ '}' }}
no_log: True
--log-file {{ '{{' }} log_file {{ '}}' }} {{ '{' }}% if container_image_prepare_debug|default(false) %{{ '}' }}--debug{{ '{' }}% endif %{{ '}' }}
- name: Delete param file
file:
dest: "{{ '{{' }} prepare_param.path {{ '}}' }}"