Skip to content

Instantly share code, notes, and snippets.

@dgrstl
Created January 13, 2015 16:04
Show Gist options
  • Save dgrstl/c8e7b2bb1998a856281f to your computer and use it in GitHub Desktop.
Save dgrstl/c8e7b2bb1998a856281f to your computer and use it in GitHub Desktop.
NC Refresh
!/bin/bash
# simple 3.7 NC classifier commands
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 -X POST -H 'Content-Type: application/json' $NC_CURL_OPT --insecure https://localhost:4433/classifier-api/v1/update-classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment