Authored by chunhua.zhang

add

... ... @@ -85,8 +85,8 @@ def ansible_tower_process(down_host, alarm):
make_sure_job_success(job_id)
#last: update git
if not keys and not values:
jenkins_param = {"token": JENKINS_TOKEN, "MODIFY_ENV": INVENTORY_ENV[inventory], "key": ",".join(keys), "value": ",".join(values)}
if keys and values:
jenkins_param = {"token": JENKINS_TOKEN, "MODIFY_ENV": INVENTORY_ENV[inventory], "keys": ",".join(keys), "values": ",".join(values)}
requests.get(JENKINS_UPDATE_VAR_URL, params = jenkins_param)
print("start to update ansible git variables : %s" % jenkins_param)
return 0
... ...