Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Last active August 28, 2017 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infamousjoeg/6b436bcdec7a46d04dde27d9f1ce3c24 to your computer and use it in GitHub Desktop.
Save infamousjoeg/6b436bcdec7a46d04dde27d9f1ce3c24 to your computer and use it in GitHub Desktop.
Example of how to create a host using host factory token via curl
## Machine identity Example (-k due to self-signed cert on Conjur Master)
token=hostfactorytokenvalue
hostid="jenkins/masters/master01"
baseurl="https://devops"
curl --request POST -k --data-urlencode id=$hostid --header "Authorization: Token token=\"$token\"" $baseurl/api/host_factories/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment