Forge Home


Puppet provider ensuring puppet certificates


33,422 latest version

4.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Nov 25th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • RedHat, Windows, Debian, Ubuntu, OS X, Solaris, SLES, AIX
This module has been deprecated by its author since May 21st 2024.

The author has suggested puppet-puppet_certificate as its replacement.

Start using this module


reidmv/puppet_certificate — version 0.1.0 Nov 25th 2019

Puppet Certificate


Manage Puppet certificates as resources using the puppet_certificate type.



puppet_certificate { '':
  ensure        => present,
  dns_alt_names => [

puppet_certificate { '':
  ensure => absent,

Advanced features


When refreshed (notify, subscribe) a puppet_certificate resource will destroy and re-create the managed certifiate. This enables changes to related resources to trigger a certificate to be regenerated.

To enable this functionality, you must set the onrefresh parameter to regenerate. Otherwise, the resource will not respond to refresh events.

Note that for this to work as expected, it will need to be combined with automatic certificate cleaning (described in a following section).

file { '/etc/puppetlabs/puppet/csr_attributes.yaml':
  ensure  => file,
  owner   => 'root',
  group   => 'root',
  mode    => '0440',
  content => epp('example/csr_attributes.yaml.epp'),
} ~>

puppet_certificate { $certname:
  ensure      => present,
  waitforcert => 60,
  onrefresh   => regenerate,

Ensure valid

Besides ensure=present, a puppet_certificate may be set to ensure=valid. When configured this way, if the Puppet certificate has expired, it will be destroyed and a new certificate created. Note that this does not automatically handle signing of the new certificate, or cleanup of the old (expired) certificate.

The renewal_grace_period parameter may be combined with ensure=valid to perform certificate regeneration a configurable number of days before a certificate is due to expire.

puppet_certificate { $certname:
  ensure               => valid,
  renewal_grace_period => 20,

Automatic certificate cleaning

The clean parameter tells a puppet_certificate to try and clean a certificate from the CA upon destroying it.

This is useful to keep the CA clean, and as a prerequisite action for generating a new certificate of the same name. To use this option effectively, it is required that a rule be added to auth.conf on the CA to allow this. For example, to allow nodes to revoke and clean their own certificates.

Example auth.conf rule:

    name: "Allow nodes to delete their own certificates",
    match-request: {
        path: "^/puppet-ca/v1/certificate(_status|_request)?/([^/]+)$",
        type: regex,
        method: [delete]
    allow: "$2",
    sort-order: 500
puppet_certificate { $certname:
  ensure               => valid,
  waitforcert          => 60,
  renewal_grace_period => 20,
  clean                => true,



  • Reid Vandewiele
  • Branan Riley
  • Raphaël Pinson