Last active
December 4, 2020 15:13
-
-
Save frgaudet/9b09f521eecbde95dd59 to your computer and use it in GitHub Desktop.
Install puppet agent on a running computer/VM
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
SERVER=foreman | |
cat > /etc/apt/sources.list.d/puppetlabs.list << EOF | |
deb http://apt.puppetlabs.com trusty main | |
deb-src http://apt.puppetlabs.com trusty main | |
deb http://apt.puppetlabs.com trusty dependencies | |
deb-src http://apt.puppetlabs.com trusty main dependencies | |
EOF | |
apt-get update | |
apt-get install -y --force-yes puppet | |
if [ -e /etc/default/puppet ]; then | |
sed -i "s/START=no/START=yes/" /etc/default/puppet | |
fi | |
cat >> /etc/puppet/puppet.conf << EOF | |
[agent] | |
server=$SERVER | |
runinterval=180 | |
EOF | |
puppet agent --enable | |
service puppet restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment