From cd24bbbc9c82bd3aa8d0d1bc63a2333286b56ac7 Mon Sep 17 00:00:00 2001 From: Shaun Brady Date: Fri, 10 Mar 2017 16:53:06 -0500 Subject: [PATCH] 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. --- lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py index 832bc55bab..fbe739ff02 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py @@ -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: