From ca3131ef66f86240b069555cc44aae5ad857b2aa Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:30:14 +0000 Subject: [PATCH] Revert breaking change - iam_role return values (#1068) (#1070) [PR #1068/8d80e9a0 backport][stable-2] Revert breaking change - iam_role return values This is a backport of PR #1068 as merged into main (8d80e9a). 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: Mark Chappell --- 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):