---
- name: Reset state
  cli_config:
    config: |
      interface Ethernet1
         channel-group 5 mode on
      interface Ethernet2
         no channel-group
      no interface Port-Channel10
  become: yes

- eos_facts:
    gather_network_resources: lag_interfaces
  become: yes

- set_fact:
    expected_config:
      - name: "Port-Channel5"
        members:
          - member: Ethernet1
            mode: "on"

- assert:
    that:
      - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(expected_config)|length == 0"
