55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
|
---
|
||
|
- debug:
|
||
|
msg: "START ios_static_routes rendered integration tests on connection={{ ansible_connection }}"
|
||
|
|
||
|
- include_tasks: _remove_config.yaml
|
||
|
|
||
|
- include_tasks: _intial_setup_config.yaml
|
||
|
|
||
|
- block:
|
||
|
- name: Rendered the provided configuration with the exisiting running configuration
|
||
|
ios_static_routes: &rendered
|
||
|
config:
|
||
|
- vrf: ansible_temp_vrf
|
||
|
address_families:
|
||
|
- afi: ipv4
|
||
|
routes:
|
||
|
- dest: 192.0.2.0/24
|
||
|
next_hops:
|
||
|
- forward_router_address: 192.0.2.1
|
||
|
name: test_vrf
|
||
|
tag: 50
|
||
|
track: 150
|
||
|
- address_families:
|
||
|
- afi: ipv4
|
||
|
routes:
|
||
|
- dest: 198.51.100.0/24
|
||
|
next_hops:
|
||
|
- forward_router_address: 198.51.101.1
|
||
|
name: route_1
|
||
|
distance_metric: 110
|
||
|
tag: 40
|
||
|
multicast: True
|
||
|
- forward_router_address: 198.51.101.2
|
||
|
name: route_2
|
||
|
distance_metric: 30
|
||
|
- forward_router_address: 198.51.101.3
|
||
|
name: route_3
|
||
|
- afi: ipv6
|
||
|
routes:
|
||
|
- dest: 2001:DB8:0:3::/64
|
||
|
next_hops:
|
||
|
- forward_router_address: 2001:DB8:0:3::2
|
||
|
name: test_v6
|
||
|
tag: 105
|
||
|
state: rendered
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == false"
|
||
|
- "result.rendered|symmetric_difference(rendered.commands) == []"
|
||
|
|
||
|
always:
|
||
|
- include_tasks: _remove_config.yaml
|