Hi, I’m trying to set up a VPC in AWS using Ansible. I’m running into a problem when I try to create a route table that should route packets to local. The following does not work:
- name: create route table for private subnets
ec2_vpc_route_table:
vpc_id: “{{ vpc_id }}”
tags:
Name: “{{ vpc_name }}-private”
subnets: - “{{ vpc_subnet_ids[‘private-a’] }}”
routes: - dest: 0.0.0.0/0
gateway_id: “local”
This results in the error message “The gateway ID ‘local’ does not exist”.
When I create the route table I want manually using the AWS Console and examine it with ec2_vpc_route_table_info, I get the following:
“routes”: [
{
“destination_cidr_block”: “10.0.0.0/16”,
“gateway_id”: “local”,
“instance_id”: null,
“interface_id”: null,
“network_interface_id”: null,
“origin”: “CreateRouteTable”,
“state”: “active”
},
My Google-Fu is too weak to find a solution, does anyone have any hints?