Last active
August 29, 2015 14:23
-
-
Save steventwheeler/8997c30003e16008ca03 to your computer and use it in GitHub Desktop.
Bootstrap Puppet Master
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 https://gist.github.com/steventwheeler/8997c30003e16008ca03/raw/bootstrap_puppet_master_centos_7.sh | bash -s maestrodev-rvm puppetlabs-apache crayfishx-firewalld puppetlabs-vcsrepo spiette-selinux | |
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-7.noarch.rpm | |
yum --assumeyes install puppetserver | |
# Make sure the puppet master process starts automatically. | |
systemctl enable puppetserver | |
systemctl start puppetserver | |
# Allow TCP connections on port 8140. | |
firewall-cmd --permanent --zone=public --add-port=8140/tcp | |
firewall-cmd --reload | |
# 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