dellemc.enterprise_sonic.sonic_facts (2.4.0) — module

Collects facts on devices running Enterprise SONiC

| "added in version" 1.0.0 of dellemc.enterprise_sonic"

Authors: Mohamed Javeed (@javeedf), Abirami N (@abirami-n)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0


Add to requirements.yml

  collections:
    - name: dellemc.enterprise_sonic
      version: 2.4.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather all facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: all
    gather_network_resources: all
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Collects VLAN and interfaces facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset:
      - min
    gather_network_resources:
      - vlans
      - interfaces
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Do not collects VLAN and interfaces facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_network_resources:
      - "!vlans"
      - "!interfaces"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Collects VLAN and minimal default facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: min
    gather_network_resources: vlans
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Collect lag_interfaces and minimal default facts
  dellemc.enterprise_sonic.sonic_facts:
    gather_subset: min
    gather_network_resources: lag_interfaces

Inputs

    
gather_subset:
    default: '!config'
    description:
    - 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.
    elements: str
    required: false
    type: list

gather_network_resources:
    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
    - mclag
    - prefix_lists
    - vlan_mapping
    - vrfs
    - vxlans
    - users
    - system
    - port_breakout
    - aaa
    - 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
    - stp
    - dhcp_snooping
    description:
    - 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.
    elements: str
    required: false
    type: list