1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-27 17:55:10 +03:00

allow for 201 status_code from callback

This commit is contained in:
Alan Rominger 2016-08-09 14:56:19 -04:00 committed by GitHub
parent ea024c7e11
commit c1e340fbd6

View File

@ -14,7 +14,7 @@ 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 == 202 || $status_code == 201 ]]
then
exit 0
fi