summaryrefslogtreecommitdiffstats
path: root/scripts/hostgroup-add2.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/hostgroup-add2.sh')
-rwxr-xr-xscripts/hostgroup-add2.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/hostgroup-add2.sh b/scripts/hostgroup-add2.sh
new file mode 100755
index 0000000..4b6f6fe
--- /dev/null
+++ b/scripts/hostgroup-add2.sh
@@ -0,0 +1,23 @@
+#!/bin/sh +x
+
+. ./include.sh
+
+json="{
+ \"method\": \"hostgroup_add\",
+ \"params\": [
+ [ \"staging\" ],
+ {
+ \"description\": \"Staging 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