@ -456,7 +456,7 @@
<< : *aws_connection_info
register : update_tags
- name : assert purg e tags worked
- name : assert updat e tags worked
assert:
that:
- update_tags.changed
@ -578,11 +578,41 @@
<< : *aws_connection_info
register : nat_gateway
- name : show route table facts
- name : show route table info, get table using route-table-id
ec2_vpc_route_table_info:
filters:
route-table-id : "{{ create_private_table.route_table.id }}"
<< : *aws_connection_info
register : route_table_info
- name : assert route_table_info has correct attributes
assert:
that:
- '"route_tables" in route_table_info'
- 'route_table_info.route_tables | length == 1'
- '"id" in route_table_info.route_tables[0]'
- '"routes" in route_table_info.route_tables[0]'
- '"associations" in route_table_info.route_tables[0]'
- '"tags" in route_table_info.route_tables[0]'
- '"vpc_id" in route_table_info.route_tables[0]'
- 'route_table_info.route_tables[0].id == create_private_table.route_table.id'
- name : show route table info, get table using tags
ec2_vpc_route_table_info:
filters:
"tag:Public": "false"
"tag:Name": "Private route table"
vpc-id : "{{ vpc.vpc.id }}"
<< : *aws_connection_info
register : route_table_info
- name : assert route_table_info has correct tags
assert:
that:
- 'route_table_info.route_tables | length == 1'
- '"tags" in route_table_info.route_tables[0]'
- '"Public" in route_table_info.route_tables[0].tags and route_table_info.route_tables[0].tags["Public"] == "false"'
- '"Name" in route_table_info.route_tables[0].tags and route_table_info.route_tables[0].tags["Name"] == "Private route table"'
- name : create NAT GW
ec2_vpc_nat_gateway:
@ -592,7 +622,7 @@
<< : *aws_connection_info
register : nat_gateway
- name : show route table facts
- name : show route table info
ec2_vpc_route_table_info:
filters:
route-table-id : "{{ create_private_table.route_table.id }}"