---
- debug: msg="START {{ connection.transport }}/set_state_absent.yaml"

- name: setup
  nxos_config:
    lines:
      - interface Loopback1
    provider: "{{ connection }}"

- name: set state=absent
  nxos_interface:
    interface: Loopback1
    state: absent
    provider: "{{ connection }}"
  register: result

- assert:
    that:
      - "result.changed == true"

- name: verify state=absent
  nxos_interface:
    interface: Loopback1
    state: absent
    provider: "{{ connection }}"
  register: result

- assert:
    that:
      - "result.changed == false"

- debug: msg="END {{ connection.transport }}/set_state_absent.yaml"
