From cd6855275e42a564201d93810b89ba7e885d1e06 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 22 Feb 2018 11:23:38 -0500 Subject: [PATCH] tower cred: filter user name lookup by the proper key --- .../web_infrastructure/ansible_tower/tower_credential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py index ffccc645ec..3851f5fe7f 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py @@ -266,7 +266,7 @@ def main(): if module.params.get('user'): user_res = tower_cli.get_resource('user') - user = user_res.get(name=module.params.get('user')) + user = user_res.get(username=module.params.get('user')) params['user'] = user['id'] if module.params.get('team'):