Skip to content

Instantly share code, notes, and snippets.

@rchrd2
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rchrd2/0b570bc8c9a7f9fa69c0 to your computer and use it in GitHub Desktop.
Save rchrd2/0b570bc8c9a7f9fa69c0 to your computer and use it in GitHub Desktop.
First steps to setup a new puppet agent
# Install NTP for clock syncing
apt-get install -y ntp
/etc/init.d/ntp start
# Install Puppet from official packages
cd
mkdir source
cd source
sudo wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
sudo dpkg -i puppetlabs-release-precise.deb
sudo apt-get update
sudo apt-get -y install puppet
# Set to start a booot
sed -i /etc/default/puppet -e 's/START=no/START=yes/'
# Update puppet.conf
cat <<<EOF > /etc/puppet/puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
listen=true
[agent]
server=puppet
report=true
pluginsync=true
EOF
# Edit auth.conf
cat <<EOF > /etc/puppet/auth.conf
path /
method find, search, save
auth yes
allow puppet
path /run
auth any
allow *
EOF
echo "Now add your puppet master to /etc/hosts"
echo " example: 10.0.0.0 puppet puppet"
echo "And then run the beacon"
echo " example: puppet agent --test --debug --waitforcert 60"
echo "And on the master accept the cert"
echo " puppet cert sign foobar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment