diff --git a/plugins/modules/validate_route_tables.py b/plugins/modules/validate_route_tables.py index 197cb5c..78ca43b 100644 --- a/plugins/modules/validate_route_tables.py +++ b/plugins/modules/validate_route_tables.py @@ -281,6 +281,7 @@ def __init__(self): def validate_vpc(self, src_vpc_id, src_private_ips, dest_vpc_id, dest_subnet_cidrs): # Check whether resources are in the same VPC. If not, Cidr cannot overlap + # Test if not (dest_vpc_id[0] == src_vpc_id[0]): for dest_cidr in dest_subnet_cidrs: for ip_addr in src_private_ips: diff --git a/roles/connectivity_troubleshooter_validate/tasks/main.yml b/roles/connectivity_troubleshooter_validate/tasks/main.yml index 2094a2b..f464af1 100644 --- a/roles/connectivity_troubleshooter_validate/tasks/main.yml +++ b/roles/connectivity_troubleshooter_validate/tasks/main.yml @@ -1,12 +1,13 @@ --- # tasks file for roles/connectivity_troubleshooter_validate +# test - name: Run 'cloud.aws_troubleshooting.connectivity_troubleshooter_validate' role block: - name: Fail when the IPv4 address of the resource you want to connect is not defined ansible.builtin.fail: msg: The IPv4 address of the resource you want to connect to must be defined as connectivity_troubleshooter_validate_destination_ip - when: connectivity_troubleshooter_validate_destination_ip is not defined + when: connectivity_troubleshooter_validate_destination_ip is defined - name: Fail when the port number you want to connect to on the destination resource is not defined ansible.builtin.fail: diff --git a/tests/integration/targets/test_connectivity_troubleshooter/tasks/setup_classic.yml b/tests/integration/targets/test_connectivity_troubleshooter/tasks/setup_classic.yml index 4fb019e..a2682d9 100644 --- a/tests/integration/targets/test_connectivity_troubleshooter/tasks/setup_classic.yml +++ b/tests/integration/targets/test_connectivity_troubleshooter/tasks/setup_classic.yml @@ -141,7 +141,7 @@ Name: "{{ instance_name }}-1" register: __create_ec2_instance_1 - - name: Deploy EC2 instance 2 + - name: Deploy EC2 instance no 2 amazon.aws.ec2_instance: instance_type: t2.micro image_id: "{{ image_id }}"