Puppet House Cleaning- 1 min
Below are some of the command’s I’ve found helpful in cleaning up nodes that have been retired, deleted or part of an auto scaling group. These commands could easily be added to a script to automate the process.
This will list all the puppet agent certs signed or pending on your puppet master. The “+” denote’s the cert is signed.
Once you have the cert name you can perform some cleanup tasks such as…
Remove exported resources, that way they stop showing up in compiled catalogs. If you are using PuppetDB you could instead use node-ttl and node-purge-ttl.
Remove the node’s cert from the Puppet Master.
Remove the node’s reports from the Puppet Dashboard.
Thoughts or comments? Please share below…