Skip to content

Instantly share code, notes, and snippets.

@csm10495
Last active April 27, 2020 00:24
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 csm10495/3788534848f29ec5306ea78cb713e2fd to your computer and use it in GitHub Desktop.
Save csm10495/3788534848f29ec5306ea78cb713e2fd to your computer and use it in GitHub Desktop.
install_puppet_master.sh
#!/bin/bash -v
# helps to install puppet 6 (as a master on this system) on CentOS/RHEL 7
set -e
alias sudo="sudo --preserve-env=PATH env "
# allow other installs
sudo yum install epel-release -y
sudo rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
sudo yum install -y puppetserver
source /etc/profile.d/puppet-agent.sh
sudo bash -c 'cat << EOF >> /etc/puppetlabs/puppet/puppet.conf
[master]
dns_alt_name = csm-puppet-master.eastus.cloudapp.azure.com # Replace with this system (the master's) FQDN
[main]
certname = csm-puppet-master.eastus.cloudapp.azure.com # Replace with this system (the master's) FQDN
server = csm-puppet-master.eastus.cloudapp.azure.com # Replace with this system (the master's) FQDN
EOF'
sudo `which puppetserver` ca setup
sudo systemctl start puppetserver
sudo systemctl enable puppetserver
sudo `which puppetserver` ca list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment