ce_facts - Gets facts about HUAWEI CloudEngine switches.¶
New in version 2.4.
Synopsis¶
- Collects facts from CloudEngine devices running the CloudEngine operating system. Fact collection is supported over Cli transport. This module prepends all of the base network fact keys with
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.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
gather_subset |
Default: !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. |
Examples¶
# 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 }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
all_ipv4_addresses
list
|
when interfaces is configured |
All IPv4 addresses configured on the device
|
BIOS Version
str
|
always |
The BIOS version running on the remote device
|
Board Type
str
|
always |
The board type of the remote device
|
config
str
|
when config is configured |
The current system configuration on the device
|
CPLD1 Version
str
|
always |
The CPLD1 Version running the remote device
|
CPLD2 Version
str
|
always |
The CPLD2 Version running the remote device
|
FAN
str
|
when hardware is configured |
The fan state on the device
|
filesystems
str
|
when hardware is configured |
The filesystems on the device
|
flash_free
str
|
when hardware is configured |
The flash free space on the device
|
flash_total
str
|
when hardware is configured |
The flash total space on the device
|
gather_subset
list
|
always |
The list of fact subsets collected from the device
|
hostname
str
|
always |
The hostname of the remote device
|
interfaces
dict
|
when interfaces is configured |
A hash of all interfaces running on the system
|
MAB Version
str
|
always |
The MAB Version running the remote device
|
memory_free
str
|
when hardware is configured |
The memory free space on the remote device
|
memory_total
str
|
when hardware is configured |
The memory total space on the remote device
|
neighbors
dict
|
when interfaces is configured |
The list of LLDP neighbors from the remote device
|
PCB Version
str
|
always |
The PCB Version running the remote device
|
PWR
str
|
when hardware is configured |
The power state on the device
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- wangdezhuang (@CloudEngine-Ansible)
Hint
If you notice any issues in this documentation you can edit this document to improve it.