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.
Conflicts:
docker/docker-puppet.py
Change-Id: Icf37dcd63e0152ee15e9f0079b45e31a4f8d9fbb
Depends-On: https://review.openstack.org/#/c/607635/
Closes-Bug: #1761624
(cherry picked from commit 6bbc3b51df
)
This commit is contained in:
parent
8537f02302
commit
e39c57b02c
|
@ -209,7 +209,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\""
|
||||
|
@ -223,7 +223,9 @@ with open(sh_script, 'w') as script_file:
|
|||
sync
|
||||
|
||||
set +e
|
||||
FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply --summarize \
|
||||
# $::deployment_type in puppet-tripleo
|
||||
export FACTER_deployment_type=containers
|
||||
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=$?
|
||||
set -e
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -534,6 +534,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