From 8b3ca4c5376972f0c52aa96dbe3084046fd3327c Mon Sep 17 00:00:00 2001 From: Rob Date: Tue, 7 Nov 2017 08:34:51 +1100 Subject: [PATCH] Fix returning module parameters for iam_role (#30669) * remove iam_role= from module.exit_json() to match return docs. * Add back old iam_role= for backwards compat --- lib/ansible/modules/cloud/amazon/iam_role.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/iam_role.py b/lib/ansible/modules/cloud/amazon/iam_role.py index 7f3a834515f..85cc9016a84 100644 --- a/lib/ansible/modules/cloud/amazon/iam_role.py +++ b/lib/ansible/modules/cloud/amazon/iam_role.py @@ -295,7 +295,7 @@ def create_or_update_role(connection, module): role = get_role(connection, module, params['RoleName']) role['attached_policies'] = get_attached_policy_list(connection, module, params['RoleName']) - module.exit_json(changed=changed, iam_role=camel_dict_to_snake_dict(role)) + module.exit_json(changed=changed, iam_role=camel_dict_to_snake_dict(role), **camel_dict_to_snake_dict(role)) def destroy_role(connection, module):