You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml

39 lines
1.1 KiB
YAML

---
- debug:
msg: "START iosxr_l3_interfaces round trip integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
- block:
- name: Round Trip test by applying the provided configuration (base config)
iosxr_l3_interfaces:
config:
- name: GigabitEthernet0/0/0/0
ipv4:
- address: 198.51.100.1/24
- name: GigabitEthernet0/0/0/1
ipv6:
- address: 2001:db8:0:3::/64
ipv4:
- address: 192.0.2.1/24
- secondary: True
address: 192.0.2.2/24
state: merged
register: base_config
- name: Gather interfaces facts
iosxr_facts:
gather_subset:
- default
gather_network_resources:
- l3_interfaces
register: l3facts_config
- name: Apply config from l3_interfaces facts generated (IDEMPOTENT)
iosxr_l3_interfaces:
config: "{{ l3facts_config['ansible_facts']['ansible_network_resources']['l3_interfaces'] }}"
state: merged
always:
- include_tasks: _remove_config.yaml