Skip to content

Instantly share code, notes, and snippets.

@nigelkersten
Created November 28, 2012 19:49
Show Gist options
  • Save nigelkersten/4163659 to your computer and use it in GitHub Desktop.
Save nigelkersten/4163659 to your computer and use it in GitHub Desktop.
puppet curl
function puppetcurl() {
if [ -z $1 ]; then
echo "must supply a thing"
return 1
fi
curl --cert $(puppet agent --configprint hostcert) \
--key $(puppet agent --configprint hostprivkey) \
--cacert $(puppet agent --configprint cacert) \
-H 'Accept: yaml' \
"https://$(puppet agent --configprint server):$(puppet agent --configprint masterport)/${1}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment