Upgrade agents using the puppet_agent module
Upgrade your Puppet agents using the
puppetlabs/puppet_agent module. The puppet_agent
module supports upgrading Puppet Core on *nix, Windows, and macOS.
Before you begin: Install the puppetlabs/puppet_agent module. To use the module to upgrade Puppet Core agents, upgrade to version 4.23.0 or later. Read about
installing modules in the following docs:
Puppet 7
changed the default
digest_algorithm setting to
sha256. To avoid breaking changes when upgrading, either disable remote
filebuckets or make sure the agent has the same digest algorithm as server by changing the digest_algorithm setting on the agent to sha256.On this page:
To upgrade on a Puppet Server node
- Add the
puppet_agentclass to agents you want to upgrade. -
In your your
site.ppfile, specify the desiredpuppet_agentpackage version and any other desired parameters described in the Forge.For Puppet Core, thecollection,username, andpasswordparameter are required, whereforge-keyis a string literal and<API_KEY>is your API key from Puppet Forge.For example:
Copy# site.pp
node default {
class { puppet_agent:
package_version => '8.12.0',
collection => 'puppetcore8
username => 'forge-key',
password => Sensitive.new("<API_KEY>>")
}
}This upgrades all of your Puppet Server managed nodes on the next agent run.
-
For Puppet Core 8.12 and later,to enable previous behavior where agents connected automatically to
puppet, run:Copypuppet config set server <FQDN> --section main