HAS_TTY='y'
HAS_COLORS="n"
-VERSION="1.1"
+VERSION="1.2"
BASENAME="$(basename ${0})"
BASE_DIR="$(dirname ${0})"
TIER="${ENVIRONMENT}"
fi
+ if [[ -z "${PROJECT}" ]] ; then
+ if [[ "${CUSTOMER}" =~ ^spk- ]] ; then
+ warn "No project for customer '${YELLOW}${CUSTOMER}${NORMAL}' given, setting it to customer."
+ PROJECT="${CUSTOMER}"
+ fi
+ fi
+
if [[ -z "${ROLE}" ]] ; then
echo "Option '${RED}-R|--role${NORMAL}' may not be empty." >&2
echo >&2
debug "Using following options:"
if [[ "${VERBOSE}" == "y" ]] ; then
+ local project_out="${CYAN}<undef>${NORMAL}"
+ if [[ -n "${PROJECT}" ]] ; then
+ project_out="${GREEN}${PROJECT}${NORMAL}"
+ fi
local msg=$( cat <<-EOF
FQDN: ${GREEN}${FQDN}${NORMAL}
Puppet environment: ${GREEN}${ENVIRONMENT}${NORMAL}
Tier: ${GREEN}${TIER}${NORMAL}
Role: ${GREEN}${ROLE}${NORMAL}
Hiera customer: ${GREEN}${CUSTOMER}${NORMAL}
+ Customer project: ${project_out}
Owner: ${GREEN}${OWNER}${NORMAL}
Contact address: ${GREEN}${CONTACT}${NORMAL}
Purpose: ${GREEN}${PURPOSE}${NORMAL}