---
- name: Setup data as facts for remove integration test
  ansible.builtin.set_fact:
    data:
      - name: eth0
        enabled: true
        duplex: auto
        speed: auto
        comment: test interface
      - name: eth1
        description: Configured by Ansible - Interface 1
        mtu: 1500
        speed: auto
        duplex: auto
        enabled: true
        vifs:
          - vlan_id: 100
            description: Eth1 - VIF 100
            mtu: 400
            enabled: true
            notes:
              - note 1
              - note 2
          - vlan_id: 101
            description: Eth1 - VIF 101
            enabled: true
      - name: eth2
        description: Configured by Ansible - Interface 2 (ADMIN DOWN)
        mtu: 600
        enabled: false

- name: Debug
  ansible.builtin.debug:
    msg: "{{ data | ansible.utils.remove_keys(target=['notes', 'comment']) }}"
  register: result

- name: Assert result dicts
  ansible.builtin.assert:
    that:
      - remove['default'] == result['msg']
