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

This fixes ansible/ansible#issues/48832
pull/49348/head
John Nelson 6 years ago committed by John R Barker
parent 1e0ab16247
commit 571749f3ed

@ -252,7 +252,8 @@ def tags_changed(nacl_id, client, module):
tags = dict() tags = dict()
if module.params.get('tags'): if module.params.get('tags'):
tags = 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) nacl = find_acl_by_id(nacl_id, client, module)
if nacl['NetworkAcls']: if nacl['NetworkAcls']:
nacl_values = [t.values() for t in nacl['NetworkAcls'][0]['Tags']] nacl_values = [t.values() for t in nacl['NetworkAcls'][0]['Tags']]

Loading…
Cancel
Save