Fix beaker under centos

beaker-puppet_install_helper 0.6.0 has made the PUPPET_INSTALL_TYPE now
default to agent which was the previous behavior we had when running
under puppet 4. Since puppet 3 is now officially EOL, this switches the
defaut to assume puppet agent packaging rather than the foss version.

Change-Id: I3243f9d7bdb19840f6462c5b6b237c2314a71fbe
This commit is contained in:
Alex Schultz 2017-01-04 16:38:33 -07:00
parent bdc77a2d66
commit 6d5803d05a
1 changed files with 6 additions and 3 deletions

View File

@ -7,13 +7,16 @@ if [ -n "${GEM_HOME}" ]; then
export PATH=${PATH}:${GEM_BIN_DIR}
fi
if [ "${PUPPET_MAJ_VERSION}" = 4 ]; then
# NOTE(aschultz): since puppet 3 is now EOL, and beaker-puppet_install_helper
# version 0.6.0 has made the agent version the default, we need to symlink
# puppet to the /opt/puppetlabs version when specifically not version 3.
if [ "${PUPPET_MAJ_VERSION}" = 3 ]; then
export PUPPET_BASE_PATH=/etc/puppet
else
export PUPPET_BASE_PATH=/etc/puppetlabs/code
export PATH=${PATH}:/opt/puppetlabs/bin
# Workaround to deploy puppet for beaker jobs
sudo -E ln -sfn /opt/puppetlabs/bin/puppet /usr/sbin/puppet
else
export PUPPET_BASE_PATH=/etc/puppet
fi
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)