Skip to content

Commit

Permalink
Add environment to puppet.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain M Conochie committed Nov 25, 2023
1 parent 0c8f3e9 commit 9b9b004
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/puppet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

PUPPET=$1
ENVIRONMENT=$2

if [ -d /target ]; then
TGT=/target
Expand All @@ -34,6 +35,10 @@ if [ ! -d ${DIR} ]; then
exit 0
fi

if [ -z "${ENVIRONMENT}" ]; then
ENVIRONMENT=production
fi

if [ -n "${PUPPET}" ]; then
echo "Configuring the puppet config file ${DIR}/puppet.conf"
cat >${DIR}/puppet.conf <<STOP
Expand All @@ -47,6 +52,7 @@ cadir = /var/lib/puppet/ssl/ca
[agent]
server = ${PUPPET}
environment = ${ENVIRONMENT}
STOP
else
Expand Down

0 comments on commit 9b9b004

Please sign in to comment.