Skip to content

Instantly share code, notes, and snippets.

@steventwheeler
Last active August 29, 2015 14:23
Show Gist options
  • Save steventwheeler/8997c30003e16008ca03 to your computer and use it in GitHub Desktop.
Save steventwheeler/8997c30003e16008ca03 to your computer and use it in GitHub Desktop.
Bootstrap Puppet Master
#!/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