Step 3: Clear and regenerate certs for Puppet agents
To replace the certs on agents, you’ll need to log into each agent node and do the following steps.
-
Stop the agent service. On *nix:
Copysudo puppet resource service puppet ensure=stoppedOn Windows, with Administrator privileges:
Copypuppet resource service puppet ensure=stopped -
Locate Puppet’s SSL directory and delete its contents.
The SSL directory can be determined by running:
puppet config print ssldir --section agent -
Restart the agent service. On *nix:
Copysudo puppet resource service puppet ensure=runningOn Windows, with Administrator privileges:
Copypuppet resource service puppet ensure=runningWhen the agent starts, it generates keys and requests a new certificate from the CA primary server.
-
If you are not using autosigning, log in to the CA primary server and sign each agent node’s certificate request.
To view pending requests, run:
Copysudo puppetserver ca listTo sign requests, run:
Copysudo puppetserver ca sign --certname <NAME>After an agent node’s new certificate is signed, it's retrieved within a few minutes and a Puppet run starts.
Results
After you have regenerated all agents’ certificates, everything will be fully functional under the new CA.