Skip to content

Instantly share code, notes, and snippets.

@arnobroekhof
Created October 16, 2013 21:23
Show Gist options
  • Select an option

  • Save arnobroekhof/7015127 to your computer and use it in GitHub Desktop.

Select an option

Save arnobroekhof/7015127 to your computer and use it in GitHub Desktop.
Cobbler delete puppet certificate on pre installation trigger
#!/bin/sh
# make sure the following is in the puppet auth.conf and autosign
# is enabled
#
# path /certificate_status
# auth any
# allow <cobbler_server>
#
#
PUPPETMASTER="puppet.mydomain.org"
HOSTNAME=$1
ENVIRONMENT="production"
CURL=/usr/bin/curl
# only needed when not using fqdn names in cobbler
# else leave it blank
DOMAIN=".virt.mydomain.org"
# Remove the certificate
${CURL} -k -X DELETE -H "Accept: pson" https://${PUPPETMASTER}:8140/${ENVIRONMENT}/certificate_status/${HOSTNAME}${DOMAIN}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment