---
- name: Ansible resource module facts example
  hosts: datacenter
  gather_facts: True
  connection: httpapi
  collections:
    - dellemc.enterprise_sonic
  tasks:
    - name: "Gather facts"
      sonic_facts:
        gather_subset: min
        gather_network_resources: 
          - interfaces
          - l3_interfaces
          - lag_interfaces
          - vlans
          - bgp
      register: result
      
    - name: "debug facts"
      debug: 
        msg: "{{ result.ansible_facts.ansible_network_resources }}"
