dellemc.enterprise_sonic.sonic_facts module – Collects facts on devices running Enterprise SONiC

Note

This module is part of the dellemc.enterprise_sonic collection (version 2.5.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.

To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_facts.

New in dellemc.enterprise_sonic 1.0.0

Synopsis

  • Collects facts from devices running Enterprise SONiC Distribution by Dell Technologies. This module places the facts gathered in the fact tree keyed by the respective resource name. The facts module always collects a base set of facts from the device and can enable or disable collection of additional facts.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

gather_network_resources

list / elements=string

When supplied, this argument restricts the facts collected to a given subset. Possible values for this argument include all and the resources like ‘all’, ‘interfaces’, ‘vlans’, ‘lag_interfaces’, ‘l2_interfaces’, ‘l3_interfaces’. Can specify a list of values to include a larger subset. Values can also be used with an initial ‘!’ to specify that a specific subset should not be collected.

Choices:

  • "all"

  • "vlans"

  • "interfaces"

  • "l2_interfaces"

  • "l3_interfaces"

  • "lag_interfaces"

  • "bgp"

  • "bgp_af"

  • "bgp_neighbors"

  • "bgp_neighbors_af"

  • "bgp_as_paths"

  • "bgp_communities"

  • "bgp_ext_communities"

  • "ospfv2_interfaces"

  • "ospfv2"

  • "mclag"

  • "prefix_lists"

  • "vlan_mapping"

  • "vrfs"

  • "vrrp"

  • "vxlans"

  • "users"

  • "system"

  • "port_breakout"

  • "aaa"

  • "ldap"

  • "tacacs_server"

  • "radius_server"

  • "static_routes"

  • "ntp"

  • "logging"

  • "pki"

  • "ip_neighbor"

  • "port_group"

  • "dhcp_relay"

  • "acl_interfaces"

  • "l2_acls"

  • "l3_acls"

  • "lldp_global"

  • "mac"

  • "bfd"

  • "copp"

  • "route_maps"

  • "lldp_interfaces"

  • "stp"

  • "poe"

  • "dhcp_snooping"

  • "sflow"

  • "fips"

  • "roce"

  • "qos_buffer"

  • "qos_pfc"

  • "qos_maps"

  • "qos_scheduler"

  • "qos_wred"

  • "qos_interfaces"

  • "pim_global"

  • "pim_interfaces"

  • "login_lockout"

  • "mgmt_servers"

  • "ospf_area"

gather_subset

list / elements=string

When supplied, this argument restricts the facts collected to a given subset. Possible values for this argument include all, min, hardware, config, legacy, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial ‘!’ to specify that a specific subset should not be collected.

Default: ["!config"]

Notes

Note

  • Tested against Enterprise SONiC Distribution by Dell Technologies.

  • Supports check_mode.

Examples

- name: Gather all facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: all
    gather_network_resources: all
- name: Collects VLAN and interfaces facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset:
      - min
    gather_network_resources:
      - vlans
      - interfaces
- name: Do not collects VLAN and interfaces facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_network_resources:
      - "!vlans"
      - "!interfaces"
- name: Collects VLAN and minimal default facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: min
    gather_network_resources: vlans
- name: Collect lag_interfaces and minimal default facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: min
    gather_network_resources: lag_interfaces

Authors

  • Mohamed Javeed (@javeedf)

  • Abirami N (@abirami-n)