1---
2- debug:
3    msg:
4      START ios_static_routes rendered integration tests on connection={{ ansible_connection
5      }}
6
7- include_tasks: _remove_config.yaml
8
9- include_tasks: _intial_setup_config.yaml
10
11- block:
12    - name: Rendered the provided configuration with the existing running configuration
13      register: result
14      cisco.ios.ios_static_routes:
15        config:
16          - vrf: ansible_temp_vrf
17            address_families:
18              - afi: ipv4
19                routes:
20                  - dest: 192.0.2.0/24
21                    next_hops:
22                      - forward_router_address: 192.0.2.1
23                        name: test_vrf
24                        tag: 50
25                        track: 150
26
27          - address_families:
28              - afi: ipv4
29                routes:
30                  - dest: 198.51.100.0/24
31                    next_hops:
32                      - forward_router_address: 198.51.101.1
33                        name: route_1
34                        distance_metric: 110
35                        tag: 40
36                        multicast: true
37
38                      - forward_router_address: 198.51.101.2
39                        name: route_2
40                        distance_metric: 30
41
42                      - forward_router_address: 198.51.101.3
43                        name: route_3
44
45              - afi: ipv6
46                routes:
47                  - dest: 2001:DB8:0:3::/64
48                    next_hops:
49                      - forward_router_address: 2001:DB8:0:3::2
50                        name: test_v6
51                        tag: 105
52        state: rendered
53
54    - assert:
55        that:
56          - result.changed == false
57          - result.rendered|symmetric_difference(rendered.commands) == []
58  always:
59    - include_tasks: _remove_config.yaml
60