#!/bin/sh
cd /root
wget https://yum.puppet.com/puppet-release-sles-15.noarch.rpm
rpm -ivh puppet-release-sles-15.noarch.rpm 
rm puppet-release-sles-15.noarch.rpm
zypper up && zypper --non-interactive in puppet-agent
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
