Note
This plugin is part of the dellemc.enterprise_sonic collection (version 1.1.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 version 1.0.0: of dellemc.enterprise_sonic
Note
This module has a corresponding action plugin.
Parameter | Choices/Defaults | 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 M(! ) to specify that a specific subset should not be collected. |
gather_subset list / elements=string | Default: "!config" | 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 M(! ) to specify that a specific subset should not be collected. |
Note
check_mode
.- 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
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_facts_module.html