docker-puppet.py: used dedicated hiera entry, not uuid
Currently it is not possible to do per-node customization inside docker-puppet.py because it overrides the fact 'uuid'. This change adds a dedicated docker_puppet entry in hiera.yaml so that docker-puppet.py needs to do nothing special for /etc/puppet/hieradata/docker_puppet.json to be included in the hiera merge. Change-Id: Icf37dcd63e0152ee15e9f0079b45e31a4f8d9fbb Depends-On: https://review.openstack.org/#/c/605478/ Closes-Bug: #1761624
This commit is contained in:
parent
4656dbe2e0
commit
6bbc3b51df
@ -245,7 +245,7 @@ with open(sh_script, 'w') as script_file:
|
||||
mkdir -p /etc/puppet
|
||||
cp -a /tmp/puppet-etc/* /etc/puppet
|
||||
rm -Rf /etc/puppet/ssl # not in use and causes permission errors
|
||||
echo "{\\"step\\": $STEP}" > /etc/puppet/hieradata/docker.json
|
||||
echo "{\\"step\\": $STEP}" > /etc/puppet/hieradata/docker_puppet.json
|
||||
TAGS=""
|
||||
if [ -n "$PUPPET_TAGS" ]; then
|
||||
TAGS="--tags \"$PUPPET_TAGS\""
|
||||
@ -263,7 +263,8 @@ with open(sh_script, 'w') as script_file:
|
||||
if [ "$NET_HOST" == "false" ]; then
|
||||
export FACTER_hostname=$HOSTNAME
|
||||
fi
|
||||
export FACTER_uuid=docker
|
||||
# $::deployment_type in puppet-tripleo
|
||||
export FACTER_deployment_type=containers
|
||||
/usr/bin/puppet apply --summarize \
|
||||
--detailed-exitcodes \
|
||||
--color=false \
|
||||
|
@ -64,8 +64,9 @@ outputs:
|
||||
# ignore copy failures as these may be the same file depending on docker mounts
|
||||
cp -a /tmp/puppet-etc/* /etc/puppet || true
|
||||
fi
|
||||
echo "{\"step\": ${STEP}}" > /etc/puppet/hieradata/docker.json
|
||||
export FACTER_uuid=docker
|
||||
echo "{\"step\": ${STEP}}" > /etc/puppet/hieradata/docker_puppet.json
|
||||
# $::deployment_type in puppet-tripleo
|
||||
export FACTER_deployment_type=containers
|
||||
set +e
|
||||
puppet apply $EXTRA_ARGS \
|
||||
--verbose \
|
||||
|
@ -664,6 +664,7 @@ resources:
|
||||
config:
|
||||
hierarchy:
|
||||
- '"%{::uuid}"'
|
||||
- docker_puppet # Optionally provided by docker-puppet.py
|
||||
- heat_config_%{::deploy_config_name}
|
||||
- config_step
|
||||
- {{role.name.lower()}}_extraconfig
|
||||
|
Loading…
Reference in New Issue
Block a user