New in version 2.4.
ansible_net_<fact>
. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.parameter | required | default | choices | comments |
---|---|---|---|---|
gather_subset |
no | !config |
When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, 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. |
# Note: examples below use the following provider dict to handle # transport and authentication to the node. - name: CloudEngine facts test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: "Gather_subset is all" ce_facts: gather_subset: all provider: "{{ cli }}" - name: "Collect only the config facts" ce_facts: gather_subset: config provider: "{{ cli }}" - name: "Do not collect hardware facts" ce_facts: gather_subset: "!hardware" provider: "{{ cli }}"
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
all_ipv4_addresses |
All IPv4 addresses configured on the device
|
when interfaces is configured | list | |
BIOS Version |
The BIOS version running on the remote device
|
always | str | |
Board Type |
The board type of the remote device
|
always | str | |
config |
The current system configuration on the device
|
when config is configured | str | |
CPLD1 Version |
The CPLD1 Version running the remote device
|
always | str | |
CPLD2 Version |
The CPLD2 Version running the remote device
|
always | str | |
FAN |
The fan state on the device
|
when hardware is configured | str | |
filesystems |
The filesystems on the device
|
when hardware is configured | str | |
flash_free |
The flash free space on the device
|
when hardware is configured | str | |
flash_total |
The flash total space on the device
|
when hardware is configured | str | |
gather_subset |
The list of fact subsets collected from the device
|
always | list | |
hostname |
The hostname of the remote device
|
always | str | |
interfaces |
A hash of all interfaces running on the system
|
when interfaces is configured | dict | |
MAB Version |
The MAB Version running the remote device
|
always | str | |
memory_free |
The memory free space on the remote device
|
when hardware is configured | str | |
memory_total |
The memory total space on the remote device
|
when hardware is configured | str | |
neighbors |
The list of LLDP neighbors from the remote device
|
when interfaces is configured | dict | |
PCB Version |
The PCB Version running the remote device
|
always | str | |
PWR |
The power state on the device
|
when hardware is configured | str |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.