Browse Source

Ensure LANG env is properly set when puppet runs.

Queens adaptation of https://review.opendev.org/c/openstack/tripleo-heat-templates/+/753407

When puppet run it must support UTF-8 or whatever is the locale on the
host.  So we make sure that we pass down the LANG to the container and
that the puppet process collect it properly.

Change-Id: Ieca91d86eda26b0e95d06f3ec78714918e8c3fc0
Co-Authored-By: Sofer Athlan-Guyot <sathlang@redhat.com>
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Co-Authored-By: Daniel Bengtsson <dbengt@redhat.com>
changes/63/753363/2
Luca Miccini 10 months ago
parent
commit
a8d2486f6f
  1. 2
      docker/docker-puppet.py

2
docker/docker-puppet.py

@ -230,6 +230,8 @@ with open(sh_script, 'w') as script_file:
# $::deployment_type in puppet-tripleo
export FACTER_deployment_type=containers
export FACTER_uuid=$(cat /sys/class/dmi/id/product_uuid | tr '[:upper:]' '[:lower:]')
: ${LANG=en_US.UTF-8}
export LANG
FACTER_hostname=$HOSTNAME /usr/bin/puppet apply --summarize \
--detailed-exitcodes --color=false --logdest syslog --logdest console --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules $TAGS /etc/config.pp
rc=$?

Loading…
Cancel
Save