How to install latest puppet agent on Debian 9 Stretch

Placeholder image

Feb 28, 2019

Debian is well known due to its stability, but it has a price: usually the packages available on the stable repository are a bit old. Debian Stretch is currently the stable version and the puppet agent package available is 4.8.2-5 beside the version 6.3 already available. So, if you want to use a newer version is necessary to use the repository provided by Puppet Labs, they provide a .deb package that can be downloaded following the URL naming convention: https://apt.puppet.com/<PLATFORM_VERSION>-release-.deb

Therefore, to download the Puppet 6 package for Debian 9 Stretch we can run:

wget https://apt.puppetlabs.com/puppet6-release-stretch.deb

or

curl https://apt.puppetlabs.com/puppet6-release-stretch.deb -o puppet6-release-stretch.deb

Then, we can install it using the dpkg command:

sudo dpkg -i puppet6-release-stretch.deb

After that we can update the package information and install the agent version 6:

sudo apt-get update && sudo apt-get install puppet-agent

Note that the package from PuppetLabs is named puppet-agent, and the package from the Debian repository is just puppet. To confirm the installed version we can use the dpkg-query command:

dpkg-query -W puppet-agent
Tags