Skip to content

Instantly share code, notes, and snippets.

@agadelshin
Created September 10, 2016 11:37
Show Gist options
  • Save agadelshin/5708309a51ccc9446db27256f6b86587 to your computer and use it in GitHub Desktop.
Save agadelshin/5708309a51ccc9446db27256f6b86587 to your computer and use it in GitHub Desktop.
Get puppetserver CA certificate
#!/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