Missed variable exchangeExists -> exchange_exists
This commit is contained in:
parent
abab60208d
commit
709817bf19
1 changed files with 4 additions and 4 deletions
|
@ -139,10 +139,10 @@ def main():
|
||||||
r = requests.get( url, auth=(module.params['login_user'],module.params['login_password']))
|
r = requests.get( url, auth=(module.params['login_user'],module.params['login_password']))
|
||||||
|
|
||||||
if r.status_code==200:
|
if r.status_code==200:
|
||||||
exchangeExists = True
|
exchange_exists = True
|
||||||
response = r.json()
|
response = r.json()
|
||||||
elif r.status_code==404:
|
elif r.status_code==404:
|
||||||
exchangeExists = False
|
exchange_exists = False
|
||||||
response = r.text
|
response = r.text
|
||||||
else:
|
else:
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
|
@ -151,9 +151,9 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
if module.params['state']=='present':
|
if module.params['state']=='present':
|
||||||
change_required = not exchangeExists
|
change_required = not exchange_exists
|
||||||
else:
|
else:
|
||||||
change_required = exchangeExists
|
change_required = exchange_exists
|
||||||
|
|
||||||
# Check if attributes change on existing exchange
|
# Check if attributes change on existing exchange
|
||||||
if not change_required and r.status_code==200 and module.params['state'] == 'present':
|
if not change_required and r.status_code==200 and module.params['state'] == 'present':
|
||||||
|
|
Loading…
Reference in a new issue