#!/bin/bash # # functions - puppet-openstack-integration specific functions # # Install external Puppet modules with r10k # Uses the following variables: # # - ``SCRIPT_DIR`` must be set to script path # - ``GEM_BIN_DIR`` must be set to Gem bin directory install_external() { PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 ${GEM_BIN_DIR}r10k puppetfile install -v } # Install Puppet OpenStack modules with zuul-cloner # Uses the following variables: # # - ``PUPPETFILE_DIR`` must be set to Puppet modules directory # - ``SCRIPT_DIR`` must be set to script path # - ``ZUUL_REF`` must be set to Zuul ref. Fallback to 'None'. # - ``ZUUL_BRANCH`` must be set to Zuul branch. Fallback to 'master'. # - ``ZUUL_URL`` must be set to Zuul URL install_openstack() { cat > clonemap.yaml </dev/null } print_header() { if [ -n "$(set | grep xtrace)" ]; then set +x local enable_xtrace='yes' fi local msg=$1 printf '%.0s-' {1..80}; echo printf '| %-76s |\n' "${msg}" printf '%.0s-' {1..80}; echo if [ -n "${enable_xtrace}" ]; then set -x fi }