diff --git a/common/container-puppet.py b/common/container-puppet.py index 9ae258bcce..7ccd1b0663 100755 --- a/common/container-puppet.py +++ b/common/container-puppet.py @@ -300,13 +300,12 @@ if not os.path.exists(sh_script): /usr/bin/puppet apply --summarize \ --detailed-exitcodes \ --color=false \ - --logdest syslog \ - --logdest console \ --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules \ $TAGS \ $CHECK_MODE \ - /etc/config.pp - rc=$? + /etc/config.pp \ + 2>&1 | logger -s -t puppet-user + rc=${PIPESTATUS[0]} set -e if [ $rc -ne 2 -a $rc -ne 0 ]; then exit $rc diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 323d50855a..314b3ae999 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -391,15 +391,17 @@ - name: Run puppet host configuration for step {{ step }} when: enable_puppet|bool - command: >- + shell: >- puppet apply {{ host_puppet_config_debug | default('') }} --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --detailed-exitcodes --summarize - --logdest syslog --logdest console --color=false + --color=false {{ ansible_check_mode | bool | ternary('--noop', '') }} {{ ansible_check_mode | bool | ternary('--hiera_config /etc/puppet/check-mode/hiera.yaml', '') }} /var/lib/tripleo-config/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}puppet_step_config.pp + 2>&1 | logger -s -t puppet-user ; + exit ${PIPESTATUS[0]} changed_when: outputs.rc == 2 register: outputs failed_when: false