2019-08-19 15:02:38 +02:00
|
|
|
---
|
|
|
|
- include_tasks: reset_config.yml
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
config:
|
|
|
|
- vlan_id: 20
|
|
|
|
state: suspend
|
2019-10-18 16:36:30 +02:00
|
|
|
- vlan_id: 50
|
|
|
|
name: fifty
|
2019-08-19 15:02:38 +02:00
|
|
|
|
|
|
|
- eos_facts:
|
|
|
|
gather_network_resources: vlans
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- name: Overrides device configuration of all vlans with provided configuration
|
|
|
|
eos_vlans:
|
|
|
|
config: "{{ config }}"
|
|
|
|
state: overridden
|
|
|
|
register: result
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "ansible_facts.network_resources.vlans|symmetric_difference(result.before) == []"
|
|
|
|
|
|
|
|
- eos_facts:
|
|
|
|
gather_network_resources: vlans
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "ansible_facts.network_resources.vlans|symmetric_difference(result.after) == []"
|
|
|
|
|
|
|
|
- set_fact:
|
2019-10-18 16:36:30 +02:00
|
|
|
expected_config: "{{ config }}"
|
2019-08-19 15:02:38 +02:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "expected_config|symmetric_difference(ansible_facts.network_resources.vlans) == []"
|