mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
Updating tower_org to use the new tower_api format
Pass sanity and unit tests, update tests Remove placeholder test function, convert tower_host module, fix misc typos
This commit is contained in:
committed by
beeankha
parent
c23d605a7a
commit
f89061da41
@@ -138,7 +138,7 @@ def main():
|
||||
'auditor': module.params.get('auditor'),
|
||||
}
|
||||
|
||||
# Attempt to lookup team based on the provided name and org ID
|
||||
# Attempt to look up user based on the provided username
|
||||
user = module.get_one('users', **{
|
||||
'data': {
|
||||
'username': user_fields['username'],
|
||||
@@ -149,8 +149,9 @@ def main():
|
||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||
module.delete_if_needed(user)
|
||||
elif state == 'present':
|
||||
# If the state was present we can let the module build or update the existing team, this will return on its own
|
||||
# If the state was present and we can let the module build or update the existing user, this will return on its own
|
||||
module.create_or_update_if_needed(user, user_fields, endpoint='users', item_type='user')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user