aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/write/fap
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/write/fap')
-rwxr-xr-xweb/api/write/fap19
1 files changed, 19 insertions, 0 deletions
diff --git a/web/api/write/fap b/web/api/write/fap
new file mode 100755
index 0000000..69058eb
--- /dev/null
+++ b/web/api/write/fap
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fil=/var/log/apache2/kek
+echo 'Content-Type: text/html'
+echo
+echo
+pw="<REDACTED>"
+sw=$(echo $PATH_INFO | sed 's/^\///')
+POST -H'Content-Type: application/json' https://gondul:${pw}@awx.tg23.gathering.org/api/v2/job_templates/19/launch/ >/dev/null 2>&1 <<_EOF_
+{"credential_passwords":{},"limit":"$sw","extra_vars":{}}
+_EOF_
+ret=$?
+./oplog >/dev/null 2>&1 <<_EOF_
+{"systems": "$sw", "log": "Refap queued in AWX for $sw"}
+_EOF_
+while read; do
+ true
+done
+echo '"ok"'