Hello,
I have no idea why this simple test code does not delete a route table. Hopefully, someone with fresh eyes can spot the problem.
Playbook:
---
- name: trythis
hosts: localhost
connection: local
gather_facts: True
tasks:
- ec2_vpc_route_table_facts:
region: "{{ aws.region }}"
filters:
route-table-id: rtb-8bb593ef
register: route_table_facts
- debug: var=route_table_facts
- ec2_vpc_route_table:
region: "{{ aws.region }}"
vpc_id: vpc-8b1277ef
route_table_id: rtb-8bb593ef
state: absent
register: route_table
- debug: var=route_table
Here’s the first debug:
ok: [localhost] => {
"route_table_facts": {
"changed": false,
"route_tables": [
{
"associations": [],
"id": "rtb-8bb593ef",
"routes": [
{
"destination_cidr_block": "[10.0.0.0/22](http://10.0.0.0/22)",
"gateway_id": "local",
"instance_id": null,
"interface_id": null,
"origin": "CreateRouteTable",
"state": "active",
"vpc_peering_connection_id": null
}
],
"tags": {},
"vpc_id": "vpc-8b1277ef"
}
]
}
}
Here’s the second debug:
TASK [debug] ***************************************************************************************
ok: [localhost] => {
"route_table": {
"changed": false
}
}
Any assistance would be appreciated!
Jack