Created
October 16, 2013 21:23
-
-
Save arnobroekhof/7015127 to your computer and use it in GitHub Desktop.
Cobbler delete puppet certificate on pre installation trigger
This file contains hidden or 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/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