Format output of init bundle puppet

This introduces the additional debug task to dump stdout/stderr output
of init bundle puppet. This allows us to easily read the output from
the puppet command instead of parsing the native ansible output with
multiple lines squashed.

Change-Id: Iddc5d5882a0d3335a8d22c0e6575c863eed8f17e
This commit is contained in:
Takashi Kajinami 2022-11-29 10:36:44 +09:00
parent 61d3a6c023
commit 05a1913bec
1 changed files with 6 additions and 0 deletions

View File

@ -60,7 +60,13 @@
puppet apply {{ (tripleo_ha_wrapper_puppet_debug | default(false) | bool) | ternary('--debug --verbose', '') }} --detailed-exitcodes \
--summarize --color=false --modulepath '{{ tripleo_ha_wrapper_puppet_modulepath }}' --tags '{{ tripleo_ha_wrapper_puppet_tags }}' \
-e '{{ tripleo_ha_wrapper_puppet_execute }}'
failed_when: false
no_log: true
register: puppet_run
- name: "Debug output for task: Run init bundle puppet on the host for {{ tripleo_ha_wrapper_service_name }}"
debug:
var: puppet_run.stdout_lines | default([]) | union(puppet_run.stderr_lines | default([]))
changed_when: puppet_run.rc == 2
failed_when: puppet_run.rc != 2 and puppet_run.rc != 0