Created
September 10, 2016 11:37
-
-
Save agadelshin/5708309a51ccc9446db27256f6b86587 to your computer and use it in GitHub Desktop.
Get puppetserver CA certificate
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
#!/usr/bin/env bash | |
set -e | |
# Mandatory variables | |
if [ -z ${PUPPETMASTER+x} ]; then | |
echo "\$PUPPETMASTER is unset" | |
exit 1 | |
fi | |
PUPPETMASTERPORT=${PUPPETMASTERPORT:-"8140"} | |
MASTERURL="https://${PUPPETMASTER}:${PUPPETMASTERPORT}" | |
curl -sS -k -X GET $MASTERURL/puppet-ca/v1/certificate/ca -o ca.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment