Skip to content

Instantly share code, notes, and snippets.

@patcon
Created October 13, 2013 03:11
Show Gist options
  • Save patcon/6957710 to your computer and use it in GitHub Desktop.
Save patcon/6957710 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# Remove the versiono of puppet installed by the vagrant guys.
# Augeas is broken on it.
sudo rm -rf /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet*
sudo rm -rf /opt/vagrant_ruby/bin/puppet*
sudo rm -rf /opt/vagrant_ruby/bin/facter
echo "Ensuring Puppet package repo available..."
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb --quiet
sudo dpkg -i puppetlabs-release-precise.deb > /dev/null
rm -rf puppetlabs-release-precise.deb
echo "Updating package repositories..."
sudo apt-get update --quiet --quiet
echo "Ensuring version $1 of Puppet installed..."
sudo apt-get install --yes --force-yes --quiet --quiet "puppet-common=$1*"
# Prevent errors by creating the default hiera.yaml because the installer won't.
cat << EOH > /etc/puppet/hiera.yaml
---
:backends: yaml
:yaml:
:datadir: /var/lib/hiera
:hierarchy: common
:logger: console
EOH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment