Created
March 25, 2015 17:51
-
-
Save marshyski/dc66065b158364414fbd to your computer and use it in GitHub Desktop.
Clean puppet cert from host when system shuts down or terminates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CERTNAME=`facter fqdn` | |
PUPPET_MASTER='puppet' | |
SSLDIR=`/usr/local/bin/puppet agent --configprint ssldir` | |
curl --noproxy '*' -X DELETE -H "Accept: pson" "https://${PUPPET_MASTER}:8140/production/certificate_status/${CERTNAME}" --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem --key /etc/puppetlabs/puppet/ssl/private_keys/${CERTNAME}.pem --cert /etc/puppetlabs/puppet/ssl/certs/${CERTNAME}.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment