community.network.edgeos_facts 模块 – 从运行 EdgeOS 的远程设备收集信息

注意

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

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

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

要在 playbook 中使用它,请指定:community.network.edgeos_facts

注意

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

已弃用

在以下版本中移除

版本 6.0.0

原因

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

替代方案

未知。

概要

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

别名:network.edgeos.edgeos_facts

参数

参数

注释

gather_subset

字符串

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

默认值: "!config"

说明

注意

  • 已针对 EdgeOS 1.9.7 进行测试

示例

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

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

- name: Collect everything exception the config
  community.network.edgeos_facts:
    gather_subset: "!config"

返回值

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

描述

ansible_net_commits

列表 / 元素=字符串

可用的配置版本集

返回:如果存在

ansible_net_config

字符串

来自设备的运行配置

返回:当配置了 config 时

ansible_net_gather_subset

列表 / 元素=字符串

模块收集的子集列表

返回:始终

ansible_net_hostname

字符串

已配置的系统主机名

返回:始终

ansible_net_model

字符串

设备型号字符串

返回:始终

ansible_net_neighbors

列表 / 元素=字符串

LLDP 邻居集

返回:当配置了接口时

ansible_net_serialnum

字符串

设备的序列号

返回:始终

ansible_net_version

字符串

正在运行的软件版本

返回:始终

状态

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

  • 有关更多信息,请参阅已弃用

作者

  • Nathaniel Case (@Qalthos)

  • Sam Doran (@samdoran)