From 4cf3c338ad7bc5b171eb3b7d18c8d5494ac1a6df Mon Sep 17 00:00:00 2001 From: Lasse Haugen Date: Wed, 5 Apr 2023 22:35:38 +0200 Subject: tg23 fix --- web/api/write/fap | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 web/api/write/fap (limited to 'web/api/write/fap') 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="" +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"' -- cgit v1.2.3