container-image-prepare: redirect all output to logfile

If container_image_prepare_debug, we also want to redirect all the
output into the same logfile used to write image operations.

Indeed, some command output isn't shown in the logfile, even with
--debug, but sent to sdterr.

To make it easier for operators on where to find logs, let's just use
the logfile in place and export everything in there, only when debug is
activated.

Change-Id: I66e846bda2bef0d27a2a26a4083249c583982e0c
This commit is contained in:
Emilien Macchi 2019-02-26 12:58:54 -05:00
parent 1da8624b99
commit 13d70f6bf8
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ outputs:
--environment-file {{ '{{' }} prepare_param.path {{ '}}' }} \
--cleanup partial \
--log-file {{ '{{' }} log_file {{ '}}' }}{{ '{' }}% if container_image_prepare_debug|default(false) %{{ '}' }} \
--debug{{ '{' }}% endif %{{ '}' }}
--debug > {{ '{{' }} log_file {{ '}}' }} 2>&1{{ '{' }}% endif %{{ '}' }}
no_log: True
- name: Delete param file
file: