Auto Sign Puppet Agent Certificates Without Manual Approval

How to Enable Autosign for Puppet Agents

If you're looking to automate the certificate signing process for Puppet agents, follow these tested and verified steps based on a real support case.


Step 1: Enable Autosign on the Primary Server

Edit the Puppet configuration file on your Primary Server:

sudo nano /etc/puppetlabs/puppet/puppet.conf

Add line "autosign = true" under the [main] section:

[main]
certname = puppet-master.example.com
server = puppet-master.example.com
user = pe-puppet
group = pe-puppet
environment_timeout = 0
module_groups = base+pe_only
autosign = true

Save and exit the file.


Step 2: Clean the Agent Certificate on Primary

To remove any conflicting certificate on the primary server, run:

puppetserver ca clean --certname agent-node.example.com

Replace agent-node.example.com with your actual agent's FQDN.


Step 3: Clean SSL Certs on the Agent Node

Now go to the agent node and clean its certificates:

puppet ssl clean

Do not run this command on the Primary server.


Step 4: Trigger Puppet Agent Run

On the same agent node, trigger a manual run:

puppet agent -t

If everything is set correctly, the agent will auto-sign and connect to the master.


Note

Cleaning certificates is only required for previously registered agents. For new nodes (especially from domains like *.example.com), this step won't be needed again.


Comments

Popular Posts

Why SELinux Is Blocking Your Service (and How to Fix It)

Puppet Code Deploy Troubleshooting & Resolution Guide

Fix: SSH Permission Denied Issue | Real Solution