diff options
Diffstat (limited to 'scripts/hostgroup-add.sh')
-rwxr-xr-x | scripts/hostgroup-add.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/hostgroup-add.sh b/scripts/hostgroup-add.sh new file mode 100755 index 0000000..066a842 --- /dev/null +++ b/scripts/hostgroup-add.sh @@ -0,0 +1,23 @@ +#!/bin/sh +x + +. ./include.sh + +json="{ + \"method\": \"hostgroup_add\", + \"params\": [ + [ \"production\" ], + { + \"description\": \"Production Servers\" + } + ], + \"id\":0 +}" + +curl\ + -H "Content-Type:application/json"\ + -H "Accept:applicaton/json"\ + --negotiate -u :\ + --cacert /etc/ipa/ca.crt\ + -d "$json"\ + -X POST\ + https://dev.example.com/ipa/json |