---
- debug:
    msg="START netconf_rpc iosxr/basic.yaml on connection={{ ansible_connection
    }}"

- name: Get schema list with XML output
  ansible.netcommon.netconf_rpc:
    rpc: get
    content: |
      <filter>
        <netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
          <schemas/>
        </netconf-state>
      </filter>
    display: xml
  vars:
    ansible_persistent_log_messages: true
  register: out

- debug: msg="netconf_rpc get output in xml {{ out }}"

- name: discard changes
  ansible.netcommon.netconf_rpc:
    rpc: discard-changes

- debug:
    msg="END netconf_rpc iosxr/basic.yaml on connection={{ ansible_connection
    }}"
