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.

Notes

Note

  • Recommended connection is network_cli.
  • This module also works with local connections for legacy playbooks.

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
string
always
The BIOS version running on the remote device

Board Type
string
always
The board type of the remote device

config
string
when config is configured
The current system configuration on the device

CPLD1 Version
string
always
The CPLD1 Version running the remote device

CPLD2 Version
string
always
The CPLD2 Version running the remote device

FAN
string
when hardware is configured
The fan state on the device

filesystems
string
when hardware is configured
The filesystems on the device

flash_free
string
when hardware is configured
The flash free space on the device

flash_total
string
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
string
always
The hostname of the remote device

interfaces
dictionary
when interfaces is configured
A hash of all interfaces running on the system

MAB Version
string
always
The MAB Version running the remote device

memory_free
string
when hardware is configured
The memory free space on the remote device

memory_total
string
when hardware is configured
The memory total space on the remote device

neighbors
dictionary
when interfaces is configured
The list of LLDP neighbors from the remote device

PCB Version
string
always
The PCB Version running the remote device

PWR
string
when hardware is configured
The power state on the device



Status

Authors

  • wangdezhuang (@QijunPan)

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/ce_facts_module.html