Skip to content

Instantly share code, notes, and snippets.

@jpadams
Last active August 29, 2015 14:11
Show Gist options
  • Save jpadams/918177c844461de7388a to your computer and use it in GitHub Desktop.
Save jpadams/918177c844461de7388a to your computer and use it in GitHub Desktop.
#!/bin/bash
declare -x PE_CERT=$(/opt/puppet/bin/puppet agent --configprint hostcert)
declare -x PE_KEY=$(/opt/puppet/bin/puppet agent --configprint hostprivkey)
declare -x PE_CA=$(/opt/puppet/bin/puppet agent --configprint localcacert)
declare -x NC_CURL_OPT="-s --cacert $PE_CA --cert $PE_CERT --key $PE_KEY --insecure"
curl $NC_CURL_OPT https://localhost:4433/classifier-api/v1/groups | python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment