# Problem - Two route tables were created with one marked as the main with no subnets associated with it

**URL:** <https://forum.ansible.com/t/problem-two-route-tables-were-created-with-one-marked-as-the-main-with-no-subnets-associated-with-it/24925>\
**Category:** Ansible Project\
**Created:** [July 7, 2017, 2:35pm UTC](https://forum.ansible.com/t/problem-two-route-tables-were-created-with-one-marked-as-the-main-with-no-subnets-associated-with-it/24925 "2017-07-07T14:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wcloud7](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wcloud7](https://forum.ansible.com/u/wcloud7)\
**Post date:** [July 7, 2017, 2:35pm UTC](https://forum.ansible.com/t/problem-two-route-tables-were-created-with-one-marked-as-the-main-with-no-subnets-associated-with-it/24925/1 "2017-07-07T14:35:29Z")

</div>

When I tried to create a route table via my playbook, two route tables were created. The main route table has 0 explicitly associated subnets while all the three subnets in this case are associated with the route table marked as not the main route table. However, this none main route table is actually the one that I expected to create since it has the names/tags that I specified in the script.

How can I create only one route table (my-private-route-table in this case) and make it the main one (prevent the other one from being created)? Here is a snippet of the code:

- name: Set up my route table  
register: my\_route\_table  
local\_action:  
module: ec2\_vpc\_route\_table  
vpc\_id: “{{ my\_vpc\_facts[‘vpcs’] [0] [‘id’] }}”  
region: “{{ region }}”  
resource\_tags:  
Name: “my-private-route-table”  
subnets:
- “{{ my\_subnet\_1[‘subnet’][‘id’] }}”
- “{{ my\_subnet\_2[‘subnet’][‘id’] }}”
- “{{ my\_subnet\_3[‘subnet’][‘id’] }}”  
routes:
- dest: 192.168.10.0/24

My Ansible version is 2.3.1.0 with Python 2.7.10 running on a MAC. Can someone please help? Thanks in advance!
