1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Missing purge_subnets parameter on function call

purge_subnets|routes were introduced recently.
ensure_subnet_associations now takes purge_subnets as a parameter.  A
call to this function was missed when introducing this feature.  With
out, results in a "got 5 expected 6" error.
This commit is contained in:
Shaun Brady 2017-03-10 16:53:06 -05:00 committed by Toshio Kuratomi
parent a04dd375eb
commit cd24bbbc9c

View file

@ -465,6 +465,7 @@ def ensure_route_table_absent(connection, module):
route_table_id = module.params.get('route_table_id')
tags = module.params.get('tags')
vpc_id = module.params.get('vpc_id')
purge_subnets = module.params.get('purge_subnets')
if lookup == 'tag':
if tags is not None:
@ -486,7 +487,7 @@ def ensure_route_table_absent(connection, module):
return {'changed': False}
# disassociate subnets before deleting route table
ensure_subnet_associations(connection, vpc_id, route_table, [], module.check_mode)
ensure_subnet_associations(connection, vpc_id, route_table, [], module.check_mode, purge_subnets)
try:
connection.delete_route_table(route_table.id, dry_run=module.check_mode)
except EC2ResponseError as e: