From 253d177dc3f6c361aedbccd095cb0b9cd626cde5 Mon Sep 17 00:00:00 2001 From: Shawn Siefkas Date: Wed, 30 Sep 2015 11:00:36 -0500 Subject: [PATCH] Check mode support for VPC route table creation --- .../modules/extras/cloud/amazon/ec2_vpc_route_table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_route_table.py b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_route_table.py index cc2b5ff8ee7..9de7a85a14e 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_route_table.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_route_table.py @@ -496,8 +496,11 @@ def ensure_route_table_present(connection, module): # If no route table returned then create new route table if route_table is None: + if module.check_mode: + module.exit_json(changed=True) + try: - route_table = connection.create_route_table(vpc_id, check_mode) + route_table = connection.create_route_table(vpc_id) changed = True except EC2ResponseError, e: module.fail_json(msg=e.message)