aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/write/fap
diff options
context:
space:
mode:
authorroot <root@gondul.tg23.gathering.org>2023-04-09 09:33:48 +0200
committerroot <root@gondul.tg23.gathering.org>2023-04-09 09:33:48 +0200
commit7fb2a008d48931ab7deb6f31a2d7c4289a71f09a (patch)
tree2a21e4a4f811bfb13f025241e55fd3aff513acd1 /web/api/write/fap
parentca8a57176f1106fa5dade25174b61c1596ac1820 (diff)
TG23: Throw everything over the wall and run!
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..1211349
--- /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"'