set -e

# Prepare puppetlabs repo
CODENAME=`lsb_release -cs`
wget http://apt.puppetlabs.com/puppetlabs-release-"$CODENAME".deb
dpkg -i puppetlabs-release-"$CODENAME".deb
apt-get update

# Install puppet/facter
apt-get install -y puppet facter
rm -f puppetlabs-release-"$CODENAME".deb

set -e

# Prepare puppetlabs repo
CODENAME=`lsb_release -cs`
wget http://apt.puppetlabs.com/puppetlabs-release-"$CODENAME".deb
dpkg -i puppetlabs-release-"$CODENAME".deb
apt-get update

# Install puppet/facter
apt-get install -y puppet facter
rm -f puppetlabs-release-"$CODENAME".deb

# Disable Puppet agent on systemd
# PuppetLabs has the service disabled per default
if which systemctl >/dev/null; then
  systemctl stop puppet
  systemctl disable puppet
fi

Make sure the Puppet agent is disabled per default on systemd
Make sure the Puppet agent is disabled per default on systemd
