ec2_vpc_nacl: Don't default name into Name unless able (#48889)

This fixes ansible/ansible#issues/48832
This commit is contained in:
John Nelson 2018-11-29 02:52:17 -07:00 committed by John R Barker
parent 1e0ab16247
commit 571749f3ed

View file

@ -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']]