Skip to content

Commit ee807bc

Browse files
committed
Merge pull request #50 from stagrlee/master
Trying out puppet 4 on ubuntu
2 parents 6271c2e + 8813588 commit ee807bc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ubuntu.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
#
33
# This bootstraps Puppet on Ubuntu 12.04 LTS.
44
#
5+
# To try puppet 4 --> PUPPET_COLLECTION=pc1 ./ubuntu.sh
6+
#
57
set -e
68

79
# Load up the release information
810
. /etc/lsb-release
911

10-
REPO_DEB_URL="http://apt.puppetlabs.com/puppetlabs-release-${DISTRIB_CODENAME}.deb"
12+
# if PUPPET_COLLECTION is not prepended with a dash "-", add it
13+
[[ "${PUPPET_COLLECTION}" == "" ]] || [[ "${PUPPET_COLLECTION:0:1}" == "-" ]] || \
14+
PUPPET_COLLECTION="-${PUPPET_COLLECTION}"
15+
[[ "${PUPPET_COLLECTION}" == "" ]] && PINST="puppet" || PINST="puppet-agent"
16+
17+
REPO_DEB_URL="http://apt.puppetlabs.com/puppetlabs-release${PUPPET_COLLECTION}-${DISTRIB_CODENAME}.deb"
1118

1219
#--------------------------------------------------------------------
1320
# NO TUNABLES BELOW THIS POINT
@@ -39,7 +46,7 @@ apt-get update >/dev/null
3946

4047
# Install Puppet
4148
echo "Installing Puppet..."
42-
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install puppet >/dev/null
49+
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install ${PINST} >/dev/null
4350

4451
echo "Puppet installed!"
4552

0 commit comments

Comments
 (0)