-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsamples.sh
30 lines (18 loc) · 817 Bytes
/
samples.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
curl -X POST -H "Content-Type: application/json" \
-d '{ "name": "my_new_hostgroup" }' \
http://127.0.0.1:5000/api/v1/hostgroups
curl -X POST -H "Content-Type: application/json" \
-d '{ "name": "master" }' \
http://127.0.0.1:5000/api/v1/environments
curl -X POST -H "Content-Type: application/json" \
-d '{ "name": "role::my_class" }' \
http://127.0.0.1:5000/api/v1/classes
curl -X PUT -H "Content-Type: application/json" \
-d '{ "class_id": 1 }' \
http://127.0.0.1:5000/api/v1/hostgroups/1
curl -X POST -H "Content-Type: application/json" \
-d '{ "name": "my_server", "environment_id":1, "hostgroup_id": 1 }' http://127.0.0.1:5000/api/v1/nodes
curl -X POST -H "Content-Type: application/json" \
-d '{ "name": "my_variable", "content": "my_content" }' \
http://127.0.0.1:5000/api/v1/variables