From 83e1b4f0457bfe1f4abb5485d9f8c1a364f18e7a Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 14 Apr 2022 16:53:58 +0200 Subject: [PATCH] Revert breaking change - iam_role return values (#1068) Revert breaking change - iam_role return values SUMMARY This hasn't been release yet, so a changelog isn't needed. While I'm generally good with cleaning up the output values here, this needs to be done as a separate breaking change, and must not be backported to stable-3. ISSUE TYPE Bugfix Pull Request COMPONENT NAME iam_role ADDITIONAL INFORMATION Breaking change silently introduced by #1054 Reviewed-by: Alina Buzachis Reviewed-by: Joseph Torcasso This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/8d80e9a062b166065c9a96fbf6d774d5d7375619 --- plugins/modules/iam_role.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/modules/iam_role.py b/plugins/modules/iam_role.py index 14a21fcf1f2..814dbbb8b99 100644 --- a/plugins/modules/iam_role.py +++ b/plugins/modules/iam_role.py @@ -506,7 +506,8 @@ def create_or_update_role(module, client): role['AttachedPolicies'] = get_attached_policy_list(module, client, role_name) role['tags'] = get_role_tags(module, client) - module.exit_json(changed=changed, iam_role=camel_dict_to_snake_dict(role, ignore_list=['tags'])) + camel_role = camel_dict_to_snake_dict(role, ignore_list=['tags']) + module.exit_json(changed=changed, iam_role=camel_role, **camel_role) def create_instance_profiles(module, client, role_name, path):