Skip to content

Commit

Permalink
Fix returning module parameters for iam_role (ansible#30669)
Browse files Browse the repository at this point in the history
* remove iam_role= from module.exit_json() to match return docs.

* Add back old iam_role= for backwards compat
  • Loading branch information
wimnat authored and s-hertel committed Nov 6, 2017
1 parent a026d64 commit 8b3ca4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/amazon/iam_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8b3ca4c

Please sign in to comment.