-
Notifications
You must be signed in to change notification settings - Fork 5
/
11_groups3.sh
executable file
·30 lines (28 loc) · 949 Bytes
/
11_groups3.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
29
30
# --dump-header (-D) dumps headers to a file, in this case STDOUT (-)
# --location (-L) follows the location in 3XX redirects. In this case to the
# location of a newly created node groups with its unique group id.
# uses immutable trusted facts and structured facts in the matching rule.
# currently API-only features!
curl -X POST -H "Content-type: application/json" \
--dump-header - \
--location \
--data \
'{
"name": "A RHEL Tomcat group",
"classes": {},
"environment": "production",
"environment_trumps": false,
"parent": "00000000-0000-4000-8000-000000000000",
"rule": [
"and",
[ "=",
[ "trusted", "extensions", "pp_role" ],
"role::linux_app"
]
],
"variables": {}
}' \
--cert $(puppet config print hostcert) \
--key $(puppet config print hostprivkey) \
--cacert $(puppet config print localcacert) \
https://$(puppet config print server):4433/classifier-api/v1/groups