diff --git a/bigtop_toolchain/bin/puppetize.sh b/bigtop_toolchain/bin/puppetize.sh index d6bb09798a..f5c01a26bf 100755 --- a/bigtop_toolchain/bin/puppetize.sh +++ b/bigtop_toolchain/bin/puppetize.sh @@ -51,7 +51,7 @@ case ${ID}-${VERSION_ID} in rpm -Uvh https://yum.puppet.com/puppet5-release-el-8.noarch.rpm dnf -y check-update dnf -y install hostname curl sudo unzip wget puppet-agent 'dnf-command(config-manager)' - /opt/puppetlabs/bin/puppet module install puppetlabs-stdlib + puppet module install puppetlabs-stdlib # Enabling the PowerTools and EPEL repositories via Puppet doesn't seem to work in some cases. # As a workaround for that, enable the former here in advance of running the Puppet manifests. dnf config-manager --set-enabled PowerTools diff --git a/docker/bigtop-puppet/build.sh b/docker/bigtop-puppet/build.sh index 574c193c08..4cf4b0bd21 100755 --- a/docker/bigtop-puppet/build.sh +++ b/docker/bigtop-puppet/build.sh @@ -37,11 +37,17 @@ else ARCH="" fi +ENV_PATH="" +if [ ${OS} = "centos" -a ${VERSION} -ge 8 ]; then + ENV_PATH='ENV PATH /opt/puppetlabs/bin:$PATH' +fi + cp ../../bigtop_toolchain/bin/puppetize.sh . cat >Dockerfile </dev/null ; then future="--parser future" fi - docker exec $1 bash -c "puppet apply --detailed-exitcodes $future --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules:/usr/share/puppet/modules /bigtop-home/bigtop-deploy/puppet/manifests" + docker exec $1 bash -c "puppet apply --detailed-exitcodes $future --hiera_config=/etc/puppet/hiera.yaml --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules:/usr/share/puppet/modules:/etc/puppetlabs/code/environments/production/modules /bigtop-home/bigtop-deploy/puppet/manifests" } get-yaml-config() {