dellemc.enterprise_sonic.sonic_pim_interfaces 模块 – 在 SONiC 上管理接口特定的 PIM 配置
注意
此模块是 dellemc.enterprise_sonic 集合 (版本 2.5.1) 的一部分。
如果您正在使用 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install dellemc.enterprise_sonic
。
要在剧本中使用它,请指定: dellemc.enterprise_sonic.sonic_pim_interfaces
。
dellemc.enterprise_sonic 2.5.0 中的新增功能
概要
此模块提供运行 SONiC 的设备的接口特定 PIM 参数的配置管理。
需要在设备中提前创建 BFD 配置文件。
参数
参数 |
注释 |
---|---|
指定接口特定的 PIM 配置。 |
|
启用 PIM 的 BFD 支持。 选项
|
|
指定要启用的 BFD 配置文件。 必须启用 PIM 的 BFD 支持才能配置 BFD 配置文件。 |
|
指定指定路由器优先级。 范围是 1 到 4294967295。 |
|
指定 Hello 间隔(秒)。 范围是 1 到 255。 |
|
接口的全名。 |
|
启用 PIM 稀疏模式。 选项
|
|
模块完成后的配置状态。
选项
|
备注
注意
支持
check_mode
。
示例
# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Delete specified interface PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_profile: profile_1
- name: 'Eth1/2'
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim bfd
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Delete all interface-specific PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
# Using merged
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim hello 45
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
- name: Merge provided interface PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
drpriority: 10
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
- name: 'Eth1/2'
hello_interval: 60
bfd_enable: true
state: merged
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
# Using replaced
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 45
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Replace PIM configurations for specified interfaces
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
state: replaced
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
# Using overridden
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 45
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Override interface-specific PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
state: overridden
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
返回值
公共返回值已在此处记录,以下是此模块特有的字段
键 |
描述 |
---|---|
模块调用后的结果配置。 返回:发生更改时 示例: |
|
模块调用时生成的配置。 返回:当 示例: |
|
模块调用前的配置。 返回:始终 示例: |
|
推送到远程设备的命令集。 返回:始终 示例: |