summaryrefslogtreecommitdiff
path: root/test/integration/targets/eos_l2_interfaces/tests/common/reset_config.yml
blob: cc43075cfdd9d3a223b9f87cc97e64f1188a541c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- name: Reset state
  eos_config:
    lines: |
      interface Ethernet1
         switchport access vlan 20
         no switchport trunk native vlan
         no switchport trunk allowed vlan
      interface Ethernet2
         no switchport access vlan
         switchport trunk native vlan 20
         switchport mode trunk
  become: yes

- eos_facts:
    gather_network_resources: l2_interfaces
  become: yes

- set_fact:
    expected_config:
      - name: Ethernet1
        access:
          vlan: 20
      - name: Ethernet2
        trunk:
          native_vlan: 20
      - name: Management1

- assert:
    that:
      - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(expected_config) == []"