Permalink
Browse files

Use Puppetlabs repo site, not gems

Tested with "precise" 12.x ships, should adapt to any Ubuntu
on its own. Targets Puppet 2.7.* as the gem install used to.
  • Loading branch information...
1 parent 5535fc0 commit e6f171b3bb1676b8bfec75ce7dc33be8f3f6ce68 @jblaine jblaine committed Apr 25, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 scripts/puppet.sh
View
@@ -51,12 +51,14 @@ else
Ubuntu) export PATH=/var/lib/gems/1.8/bin:/usr/local/bin:$PATH
which puppet > /dev/null 2>&1
if [ $? -ne 0 ]; then
+ # CODENAME is 'precise', 'oneiric', etc.
+ CODENAME=`lsb_release -c | awk '{print $2}'`
+ REPO_DEB="puppetlabs-release-${CODENAME}.deb"
+ wget --quiet http://apt.puppetlabs.com/${REPO_DEB} || Fatal "Could not retrieve http://apt.puppetlabs.com/${REPO_DEB}"
+ dpkg -i ${REPO_DEB} || Fatal "Could not install Puppet repo source '${REPO_DEB}'"
+ rm -f ${REPO_DEB}
apt-get update
- apt-get install -y ruby1.8 \
- ruby1.8-dev \
- libopenssl-ruby1.8 \
- rubygems
- gem install puppet --version "~> 2.7" --no-ri --no-rdoc
+ apt-get -qqy install puppet-common=2.7.* puppet=2.7.* hiera=1.1.* hiera-puppet=1.0* || Fatal "Could not install Puppet"
fi
;;
*) Fatal "Unsupported Linux flavor: $LINUXFLAVOR"

0 comments on commit e6f171b

Please sign in to comment.