Last active
May 9, 2016 19:54
-
-
Save steventwheeler/7755d5bfdc5ca38890a89d4915617be4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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