puppet-openstack-integration/install_modules.sh
Cody Herriges 58e1dff643 Export path when puppet 4.
This commit just exports PATH when testing against Puppet 4.

  Tests pass without this in some environments but is dependent on sudo
  configurations, to get tests passing in OpenStack Infra, this is
  required.

Change-Id: I04b486fb398aaad1a3333477995ec00a76b9da0b
2016-03-28 20:23:13 -07:00

28 lines
564 B
Bash
Executable File

#!/bin/bash
set -ex
if [ -n "${GEM_HOME}" ]; then
GEM_BIN_DIR=${GEM_HOME}/bin/
fi
if [ "${PUPPET_VERSION}" = 4 ]; then
export PUPPET_BASE_PATH=/etc/puppetlabs/code
export PATH=${PATH}:/opt/puppetlabs/bin
else
export PUPPET_BASE_PATH=/etc/puppet
fi
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
export PUPPETFILE_DIR=${PUPPETFILE_DIR:-${PUPPET_BASE_PATH}/modules}
source $SCRIPT_DIR/functions
gem install r10k --no-ri --no-rdoc
# make sure there is no puppet module pre-installed
rm -rf "${PUPPETFILE_DIR:?}/"*
install_modules
puppet module list