
The PUPPETFILE and PUPPETFILE_DIR environment variables are deprecated since several releases and are superseeded by the --puppetfile and --moduledir arguments. [0] [1] This patch replaces all those occurences to future proof it when the env vars are removed. [0] http://logs.openstack.org/57/529657/2/check/puppet-openstack-integration-4-scenario004-tempest-ubuntu-xenial/ce6f987/job-output.txt.gz#_2017-12-21_22_52_53_499924 [1] https://github.com/puppetlabs/r10k/pull/479 Change-Id: I216fe01a13e46c90bbb1455df72b25daf899c9f0
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
if [ -n "${GEM_HOME}" ]; then
|
|
GEM_BIN_DIR=${GEM_HOME}/bin/
|
|
export PATH=${PATH}:${GEM_BIN_DIR}
|
|
fi
|
|
|
|
# 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.
|
|
# Workaround to deploy puppet for beaker jobs
|
|
if [ -e /opt/puppetlabs/bin/puppet ]; then
|
|
export PUPPET_BASE_PATH=/etc/puppetlabs/code
|
|
export PATH=${PATH}:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin
|
|
sudo -E ln -sfn /opt/puppetlabs/bin/puppet /usr/sbin/puppet
|
|
fi
|
|
|
|
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
|
|
export MODULES_DIR=${MODULES_DIR:-${PUPPET_BASE_PATH}/modules}
|
|
source $SCRIPT_DIR/functions
|
|
|
|
print_header 'Start (install_modules.sh)'
|
|
print_header 'Install r10k'
|
|
# fast_gettext 1.2.0+ requires ruby 2.1.0
|
|
gem install fast_gettext -v '< 1.2.0' --verbose
|
|
# puppet_forge 2.2.7 has a dependency on semantic_puppet ~> 1.0
|
|
# which is not compatible with dependency of latest r10k on semantic_puppet ~> 0.1.0
|
|
gem install puppet_forge -v '= 2.2.6' --verbose
|
|
gem install r10k --no-ri --no-rdoc --verbose
|
|
|
|
# make sure there is no puppet module pre-installed
|
|
rm -rf "${MODULES_DIR:?}/"*
|
|
|
|
print_header 'Install Modules'
|
|
install_modules
|
|
|
|
print_header 'Module List'
|
|
puppet module list
|
|
|
|
print_header 'Done (install_modules.sh)'
|