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.

To upgrade on a Puppet Server node

  1. Add the puppet_agent class to agents you want to upgrade.
  2. In your your site.pp file, specify the desired puppet_agent package version and any other desired parameters described in the Forge.

    For Puppet Core, the collection, username, and password parameter are required, where forge-key is a string literal and <API_KEY> is your API key from Puppet Forge.

    For example:

    # 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.

  3. For Puppet Core 8.12 and later,to enable previous behavior where agents connected automatically to puppet, run:
    puppet config set server <FQDN> --section main