Created
July 11, 2016 19:07
-
-
Save discreet/6f6624ae45496a498992ae5042ba08f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -k -X POST -H "Accept: application/json" \ | |
-H "Accept: application/json" -H "Content-Type: application/json" \ | |
-H "Cache-Control: no-cache" -u "username:password" \ | |
-d ' | |
{ | |
"host": { | |
"name": "<instance_id>", | |
"organization_id": 4, | |
"location_id": 12, | |
"hostgroup_id": <hostgroup_id>, | |
"environment_id": <environment_id>, | |
"puppet_proxy_id": 2, | |
"puppet_ca_proxy_id": 5, | |
"operatingsystem_id": 13, | |
"enabled": true, | |
"managed": false, | |
"certname": "<instance_id>", | |
"comment": "<comment>", | |
"parameters": { | |
"param1": { | |
"name": "aws_account", | |
"value": "<aws account_id>" | |
} | |
} | |
} | |
} | |
' "https://foreman.domain.com/api/hosts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment