cisco.iosxr.iosxr_netconf 模块 – 在 Cisco IOS-XR 设备上配置 NetConf 子系统服务

注意

此模块是 cisco.iosxr 集合 (版本 10.2.2) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install cisco.iosxr

要在 playbook 中使用它,请指定: cisco.iosxr.iosxr_netconf

cisco.iosxr 1.0.0 中的新增功能

概要

  • 此模块提供一个抽象层,用于启用和配置在 Cisco IOS-XR 软件上运行的 netconf 系统服务。此模块可用于轻松启用 Netconf API。Netconf 提供了一个编程接口,用于处理 RFC 6242 中定义的配置和状态资源。

参数

参数

注释

netconf_port

别名:listens_on

整数

此参数指定 netconf 服务应监听 SSH 连接的端口。RFC 6242 中定义的默认端口是 830。

默认值: 830

netconf_vrf

别名:vrf

字符串

netconf vrf 名称

默认值: "default"

状态

字符串

指定远程设备上 iosxr_netconf 资源的状态。如果 state 参数设置为 present,则将配置 netconf 服务。如果 state 参数设置为 absent,则将从配置中删除 netconf 服务。

选项

  • "present" ← (默认)

  • "absent"

备注

注意

示例

- name: enable netconf service on port 830
  cisco.iosxr.iosxr_netconf:
    listens_on: 830
    state: present

- name: disable netconf service
  cisco.iosxr.iosxr_netconf:
    state: absent

返回值

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

描述

commands

字符串

返回发送到远程设备的命令

返回:当 changed 为 True 时

示例: "ssh server netconf port 830"

作者

  • Kedar Kekan (@kedarX)