community.network.icx_facts 模块 – 从远程 Ruckus ICX 7000 系列交换机收集信息

注意

此模块是 community.network 集合(版本 5.1.0)的一部分。

如果您使用的是 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.network

要在剧本中使用它,请指定:community.network.icx_facts

注意

community.network 集合已被弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅讨论主题

已弃用

在以下版本中删除:

版本 6.0.0

原因:

此集合及其中的所有内容都未维护且已弃用。

替代方案:

未知。

概要

  • 从运行 ICX 的远程设备收集基本设备信息集。此模块在所有基本网络信息键前添加 ansible_net_<fact>。facts 模块始终从设备收集基本信息集,并且可以启用或禁用收集其他信息。

别名:network.icx.icx_facts

参数

参数

注释

gather_subset

列表 / 元素=字符串

当提供此参数时,它会将收集的信息限制为给定的子集。此参数的可能值包括 all、hardware、config 和 interfaces。可以指定一个值列表以包括更大的子集。这些值也可以与初始 ! 一起使用,以指定不应收集特定的子集。

默认值: ["!config"]

注意

注意

示例

- name: Collect all facts from the device
  community.network.icx_facts:
    gather_subset: all

- name: Collect only the config and default facts
  community.network.icx_facts:
    gather_subset:
      - config

- name: Do not collect hardware facts
  community.network.icx_facts:
    gather_subset:
      - "!hardware"

返回值

常见返回值记录在 此处,以下是此模块独有的字段

描述

ansible_net_all_ipv4_addresses

列表 / 元素=字符串

设备上配置的所有 IPv4 地址

返回: 当配置 interfaces 时

ansible_net_all_ipv6_addresses

列表 / 元素=字符串

设备上配置的所有 IPv6 地址

返回: 当配置 interfaces 时

ansible_net_config

字符串

来自设备的当前活动配置

返回: 当配置 config 时

ansible_net_filesystems

列表 / 元素=字符串

设备上所有可用的文件系统名称

返回: 当配置 hardware 时

ansible_net_filesystems_info

字典

所有文件系统的哈希值,包含有关每个文件系统的信息(例如,可用空间和总空间)

返回: 当配置 hardware 时

ansible_net_gather_subset

列表 / 元素=字符串

从设备收集的信息子集列表

返回: 始终

ansible_net_hostname

字符串

设备的已配置主机名

返回: 始终

ansible_net_image

字符串

设备正在运行的镜像文件

返回: 始终

ansible_net_interfaces

字典

系统上运行的所有接口的哈希值

返回: 当配置 interfaces 时

ansible_net_memfree_mb

整数

远程设备上的可用空闲内存(以 Mb 为单位)

返回: 当配置 hardware 时

ansible_net_memtotal_mb

整数

远程设备上的总内存(以 Mb 为单位)

返回: 当配置 hardware 时

ansible_net_model

字符串

从设备返回的型号名称

返回: 始终

ansible_net_neighbors

字典

来自远程设备的 LLDP 邻居列表

返回: 当配置 interfaces 时

ansible_net_serialnum

字符串

远程设备的序列号

返回: 始终

ansible_net_stacked_models

列表 / 元素=字符串

堆栈中每个设备的型号名称

返回: 当在堆栈中配置多个设备时

ansible_net_stacked_serialnums

列表 / 元素=字符串

堆栈中每个设备的序列号

返回: 当在堆栈中配置多个设备时

ansible_net_version

字符串

远程设备上运行的操作系统版本

返回: 始终

状态

  • 此模块将在版本 6.0.0 中删除。[已弃用]

  • 更多信息请参阅 已弃用

作者

  • Ruckus Wireless (@Commscope)