Skip to content

Instantly share code, notes, and snippets.

@steventwheeler
Last active May 9, 2016 19:54
Show Gist options
  • Save steventwheeler/7755d5bfdc5ca38890a89d4915617be4 to your computer and use it in GitHub Desktop.
Save steventwheeler/7755d5bfdc5ca38890a89d4915617be4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Example Usage:
# curl -sSL httpshttps://gist.githubusercontent.com/steventwheeler/7755d5bfdc5ca38890a89d4915617be4/raw/bootstrap_puppet_master_centos_6.sh | bash -s
if [[ $EUID -ne 0 ]] ; then
echo "This script must be run as root."
exit 1
fi
# Setup YUM and install the puppet-server package.
yum --assumeyes install http://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
yum --assumeyes install puppetserver
# Make sure the puppet master process starts automatically.
chkconfig puppetserver on
service puppetserver start
# Allow TCP connections on port 8140.
iptables -I INPUT -p tcp --dport 8140 -m state --state NEW,ESTABLISHED -j ACCEPT
service iptables save
# Install plugins from Puppet Forge.
while [ ! -z "$1" ] ; do
/opt/puppetlabs/bin/puppet module install $1
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment