puppet-openstack-integration/install_modules.sh
Alex Schultz 20730feff0 Add a function for generating action headers
In order to help be able to determine what part of the script a failure
occurs in, this change adds a print header function and updates the
shell scripts to print some header information for various actions.

Change-Id: I8e622c4d1c9c03aa3dbcb27712a346ce3284003f
2016-04-14 14:57:22 -06:00

34 lines
734 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
print_header 'Start (install_modules.sh)'
print_header 'Install r10k'
gem install r10k --no-ri --no-rdoc
# make sure there is no puppet module pre-installed
rm -rf "${PUPPETFILE_DIR:?}/"*
print_header 'Install Modules'
install_modules
print_header 'Module List'
puppet module list
print_header 'Done (install_modules.sh)'