mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Update to response code
set response code for current versions of tower/awx
This commit is contained in:
parent
f6a1707684
commit
dc26580466
@ -438,8 +438,8 @@ class TowerAPIModule(TowerModule):
|
||||
|
||||
response = self.post_endpoint(endpoint, **{'data': new_item})
|
||||
|
||||
# 200 is response from approval node creation
|
||||
if response['status_code'] == 201:
|
||||
# 200 is response from approval node creation on tower 3.7.3 or awx 15.0.0 or earlier.
|
||||
if response['status_code'] in [200, 201]:
|
||||
self.json_output['name'] = 'unknown'
|
||||
for key in ('name', 'username', 'identifier', 'hostname'):
|
||||
if key in response['json']:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user