From 134b9f50c3cb71d8158f5e1d586c0da366ddb8db Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Tue, 7 Nov 2017 20:14:13 -0500 Subject: [PATCH] Do not set a default value for description in the iam_role module. (#32629) --- lib/ansible/modules/cloud/amazon/iam_role.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/iam_role.py b/lib/ansible/modules/cloud/amazon/iam_role.py index 85cc9016a8..d7c989ecf0 100644 --- a/lib/ansible/modules/cloud/amazon/iam_role.py +++ b/lib/ansible/modules/cloud/amazon/iam_role.py @@ -214,7 +214,8 @@ def create_or_update_role(connection, module): params['Path'] = module.params.get('path') params['RoleName'] = module.params.get('name') params['AssumeRolePolicyDocument'] = module.params.get('assume_role_policy_document') - params['Description'] = module.params.get('description') + if module.params.get('description') is not None: + params['Description'] = module.params.get('description') managed_policies = module.params.get('managed_policy') if managed_policies: managed_policies = convert_friendly_names_to_arns(connection, module, managed_policies) @@ -368,7 +369,7 @@ def main(): assume_role_policy_document=dict(type='json'), managed_policy=dict(type='list', aliases=['managed_policies']), state=dict(choices=['present', 'absent'], required=True), - description=dict(required=False, type='str', default='') + description=dict(required=False, type='str') ) )