aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/write/fap
diff options
context:
space:
mode:
authorLasse Haugen <haugen.lasse@gmail.com>2023-04-05 22:35:38 +0200
committerLasse Haugen <haugen.lasse@gmail.com>2023-04-07 18:43:03 +0200
commit4cf3c338ad7bc5b171eb3b7d18c8d5494ac1a6df (patch)
treeae7bc513d81c0abb6cba7f8c7f530cf569ee72fd /web/api/write/fap
parent73712230cccb52757abdf3b3197b441ee301638a (diff)
tg23 fixtg23
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"'