HAS_TTY='y'
HAS_COLORS="n"
-VERSION="1.3"
+VERSION="1.4"
BASENAME="$(basename ${0})"
BASE_DIR="$(dirname ${0})"
OWNER=
PURPOSE="Projekt Kunde"
CONTACT="8x5@pixelpark.com"
+LOCATION="L105 / VMWare"
+ZONE="N/A"
OS=
RELEASE=
PKG_NAME="puppet-agent"
-M|--email MAIL_ADDRESS
The E-Mail-Address of the responsible Person
or Mailgroup, Default: <${CONTACT}>.
+ -l|--location LOCATION
+ The location in the MOTD, Default: '${LOCATION}'.
+ -z|--zone ZONE_HOST
+ The containing zone host of this zone, VM or container, Default: '${ZONE}'.
--server HOSTADDRESS
The hostname or IP address of the Puppetserver to use
in the puppet configuration. Might be a loadbalancer IP.
local tmp=
local base_dir=
- local short_options="E:C:p:O:T:R:P:M:dvqhV"
+ local short_options="E:C:p:O:T:R:P:M:l:z:dvqhV"
local long_options="env:,environment:,customer:,hiera-customer:,project:,owner:,tier:,role:,"
- long_options+="purpose:,server:,ca-server:,email:,debug,verbose,quiet,help,version"
+ long_options+="purpose:,server:,ca-server:,email:,location:,zone:,"
+ long_options+="debug,verbose,quiet,help,version"
set +e
tmp=$( getopt -o "${short_options}" --long "${long_options}" -n "${BASENAME}" -- "$@" )
shift
shift
;;
+ -l|--location)
+ LOCATION="$2"
+ shift
+ shift
+ ;;
+ -z|--zone)
+ ZONE="$2"
+ shift
+ shift
+ ;;
--server)
PUPPET_SERVER="$2"
shift
Customer project: ${project_out}
Owner: ${GREEN}${OWNER}${NORMAL}
Contact address: ${GREEN}${CONTACT}${NORMAL}
+ Location: ${GREEN}${LOCATION}${NORMAL}
+ Zone: ${GREEN}${ZONE}${NORMAL}
Purpose: ${GREEN}${PURPOSE}${NORMAL}
EOF
content=$( cat <<-EOF
---
pp_purpose: ${PURPOSE}
- pp_location: L105
+ pp_location: '${LOCATION}'
pp_owner: ${OWNER}
pp_contact: ${CONTACT}
- pp_zonehost: VMWare
+ pp_zonehost: '${ZONE}'
EOF
)
debug "Generatet content of '${yfile}':\n${content}"