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 c1edbffe42..fd484b72b3 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 @@ -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: diff --git a/environments/container-image-prepare-debug.yaml b/environments/container-image-prepare-debug.yaml new file mode 100644 index 0000000000..e576a7ae18 --- /dev/null +++ b/environments/container-image-prepare-debug.yaml @@ -0,0 +1,5 @@ +# A Heat environment file which can be used to enable container image prepare +# debugging + +parameter_defaults: + ContainerImagePrepareDebug: true diff --git a/releasenotes/notes/container_image_prepare_debug-52fcb324633d2cf0.yaml b/releasenotes/notes/container_image_prepare_debug-52fcb324633d2cf0.yaml new file mode 100644 index 0000000000..385c32345b --- /dev/null +++ b/releasenotes/notes/container_image_prepare_debug-52fcb324633d2cf0.yaml @@ -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.