mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
Merge pull request #3230 from ansible/AlanCoding-patch-1
Allow for 201 callback status code
This commit is contained in:
commit
b3c8333867
@ -14,8 +14,11 @@ attempt=0
|
||||
while [[ $attempt -lt $retry_attempts ]]
|
||||
do
|
||||
status_code=`curl -s -i --data "host_config_key=$2" http://$1/api/v1/job_templates/$3/callback/ | head -n 1 | awk '{print $2}'`
|
||||
if [[ $status_code == 202 ]]
|
||||
if [[ $status_code -ge 300 ]]
|
||||
then
|
||||
echo "${status_code} received, encountered problem, halting."
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
attempt=$(( attempt + 1 ))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user