From 571749f3ed5b7969358ae6f7c7187936984c318d Mon Sep 17 00:00:00 2001 From: John Nelson Date: Thu, 29 Nov 2018 02:52:17 -0700 Subject: [PATCH] ec2_vpc_nacl: Don't default name into Name unless able (#48889) This fixes ansible/ansible#issues/48832 --- lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py index 642e54868c8..d0473d9f4c0 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py @@ -252,7 +252,8 @@ def tags_changed(nacl_id, client, module): tags = dict() if module.params.get('tags'): tags = module.params.get('tags') - tags['Name'] = module.params.get('name') + if module.params.get('name') and not tags.get('Name'): + tags['Name'] = module.params['name'] nacl = find_acl_by_id(nacl_id, client, module) if nacl['NetworkAcls']: nacl_values = [t.values() for t in nacl['NetworkAcls'][0]['Tags']]