Created
April 27, 2020 00:23
-
-
Save csm10495/330b77357d8a8ed1b80f0bbf2e4aea3c to your computer and use it in GitHub Desktop.
install_puppet_agent.sh
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
#!/bin/bash -v | |
# Helps to install a puppet 6 agent (pointing to a puppet server/master) on CentOS / RHEL | |
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 puppet-agent | |
source /etc/profile.d/puppet-agent.sh | |
sudo bash -c 'cat << EOF >> /etc/puppetlabs/puppet/puppet.conf | |
[main] | |
certname = csm-puppet-agent1.eastus.cloudapp.azure.com # Replace with this system's FQDN | |
server = csm-puppet-master.eastus.cloudapp.azure.com # Replace with the master's FQDN | |
environment = production | |
runinterval = 1h | |
EOF' | |
sudo `which puppet` resource service puppet ensure=running enable=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment