community / community.general / 0.1.1 / module / ce_facts Gets facts about HUAWEI CloudEngine switches. Authors: wangdezhuang (@QijunPan) preview | supported by communitycommunity.general.ce_facts (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
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 C(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.
# 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 }}"
gather_subset: default: '!config' description: - 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 C(M(!)) to specify that a specific subset should not be collected. required: false
BIOS Version: description: The BIOS version running on the remote device returned: always type: str Board Type: description: The board type of the remote device returned: always type: str CPLD1 Version: description: The CPLD1 Version running the remote device returned: always type: str CPLD2 Version: description: The CPLD2 Version running the remote device returned: always type: str FAN: description: The fan state on the device returned: when hardware is configured type: str MAB Version: description: The MAB Version running the remote device returned: always type: str PCB Version: description: The PCB Version running the remote device returned: always type: str PWR: description: The power state on the device returned: when hardware is configured type: str all_ipv4_addresses: description: All IPv4 addresses configured on the device returned: when interfaces is configured type: list config: description: The current system configuration on the device returned: when config is configured type: str filesystems: description: The filesystems on the device returned: when hardware is configured type: str flash_free: description: The flash free space on the device returned: when hardware is configured type: str flash_total: description: The flash total space on the device returned: when hardware is configured type: str gather_subset: description: The list of fact subsets collected from the device returned: always type: list hostname: description: The hostname of the remote device returned: always type: str interfaces: description: A hash of all interfaces running on the system returned: when interfaces is configured type: dict memory_free: description: The memory free space on the remote device returned: when hardware is configured type: str memory_total: description: The memory total space on the remote device returned: when hardware is configured type: str neighbors: description: The list of LLDP neighbors from the remote device returned: when interfaces is configured type: dict