Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quickly install Puppet from source + dependencies
# Quick and easy script to install Puppet, Facter and dependencies.
# Kickstarts a node ready for puppeting.
# Tested with:
# - Scientific Linux 6.1, 6.2, 6.3
# - CentOS 6.3
## Installing Ruby
echo "Installing Ruby.."
yum -y -e 0 -d 0 install ruby ruby-devel rubygems libselinux-ruby gcc make
gem install -r -v 2.4.1 ruby-shadow
echo "Downloading Facter.."
curl -s -O ${FACTER_TGZ}
echo "Downloading Puppet.."
curl -s -O ${PUPPET_TGZ}
id puppet 2>1 1>/dev/null
if [[ $? == 1 ]]; then
adduser -r puppet
## Install Facter
echo "Installing Facter.."
tar xzf facter-1.7.6.tar.gz
rm -f facter-1.7.6.tar.gz
pushd facter*
ruby ./install.rb 1>/dev/null
## Install Puppet
echo "Installing Puppet.."
tar xzf puppet-2.7.26.tar.gz
rm -f puppet-2.7.26.tar.gz
pushd puppet*
ruby ./install.rb 1>/dev/null
cp conf/redhat/client.init /etc/init.d/puppet && chmod +x /etc/init.d/puppet
cp conf/redhat/client.sysconfig /etc/sysconfig/puppet
cp conf/redhat/logrotate /etc/logrotate.d/puppetmaster
cp conf/redhat/puppet.conf /etc/puppet/
chkconfig --add puppet
chkconfig puppet on
echo "
* 1. Configure your Puppet Master in puppet.conf:
server =
* 2. Run:
puppet agent -v --test --waitforcert 60 send a signing request to the Puppet Master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment