mirror of
https://github.com/ansible/awx.git
synced 2026-02-14 01:34:45 -03:30
Fix username/name issue in tower_user module, update test playbook
This commit is contained in:
@@ -531,8 +531,11 @@ class TowerModule(AnsibleModule):
|
||||
# If we have an item, we can see if it needs an update
|
||||
try:
|
||||
item_url = existing_item['url']
|
||||
item_name = existing_item['name']
|
||||
item_type = existing_item['url']
|
||||
item_type = existing_item['type']
|
||||
if item_type == 'user':
|
||||
item_name = existing_item['username']
|
||||
else:
|
||||
item_name = existing_item['name']
|
||||
item_id = existing_item['id']
|
||||
except KeyError as ke:
|
||||
self.fail_json(msg="Unable to process update of item due to missing data {0}".format(ke))
|
||||
|
||||
Reference in New Issue
Block a user