#!/bin/sh
cd /root
wget https://apt.puppetlabs.com/puppet-release-focal.deb
dpkg -i puppet-release-focal.deb
rm puppet-release-focal.deb
apt-get update && apt-get install puppet-agent -y
cat > /etc/puppetlabs/puppet/puppet.conf <<-EOF
[main]

[agent]
pluginsync      = true
report          = true
ignoreschedules = true
ca_server       = foreman.server.pink
environment     = production
server          = foreman.server.pink
EOF
/opt/puppetlabs/bin/puppet agent -t
