dellemc.enterprise_sonic.sonic_radius_server 模块 – 管理 RADIUS 服务器及其参数
注意
此模块是 dellemc.enterprise_sonic 集合(版本 2.5.1)的一部分。
如果您正在使用 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.enterprise_sonic
。
要在 playbook 中使用它,请指定:dellemc.enterprise_sonic.sonic_radius_server
。
dellemc.enterprise_sonic 1.0.0 中的新增功能
概要
此模块提供在运行 Enterprise SONiC 的设备上对 radius 服务器参数进行配置管理。
注意
此模块具有相应的 操作插件。
参数
参数 |
注释 |
---|---|
指定与 radius 服务器相关的配置。 |
|
指定 radius 服务器的身份验证类型。 选项
|
|
指定 radius 服务器的密钥。 |
|
指定 radius 服务器的网络接入服务器。 |
|
指定 radius 服务器的重传值。 |
|
指定 radius 服务器的服务器列表。 |
|
指定 radius 服务器列表的主机详细信息。 |
|
指定 radius 服务器主机的身份验证类型。 选项
|
|
指定 radius 服务器主机的密钥。 |
|
指定 radius 服务器主机的名称。 |
|
指定 radius 服务器主机的端口。 默认值: |
|
指定 radius 服务器主机的优先级。 |
|
指定 radius 服务器主机的重传。 |
|
指定 radius 服务器主机的源接口。 |
|
指定 radius 服务器主机的超时时间。 |
|
指定 radius 服务器主机的 vrf。 |
|
指定 radius 服务器的统计标志。 选项
|
|
指定 radius 服务器的超时时间。 默认值: |
|
指定对设备上配置的 radius 服务器执行的操作。 如果是 merged,则输入模式配置将与设备上现有的 radius 服务器配置合并。 如果是 deleted,则将从设备中删除现有的 radius 服务器模式配置。 如果是 replaced,则将使用提供的配置替换现有的 radius 服务器配置。 如果是 overridden,则将使用提供的配置覆盖现有的 radius 服务器配置。 选项
|
注释
注意
已针对 Dell Technologies 的 Enterprise SONiC 发行版进行测试。
支持
check_mode
。
示例
# Using deleted
#
# Before state:
# -------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#nas-ip-addr: 1.2.3.4
#statistics : True
#timeout : 10
#auth-type : chap
#key : chap
#retransmit : 3
#--------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------
#localhost mschapv2 local 52 2 20 2 mgmt Ethernet12
#myhost chap local 53 3 23 3 mgmt Ethernet24
#---------------------------------------------------------
#RADIUS Statistics
#---------------------------------------------------------
#
- name: Merge radius configurations
dellemc.enterprise_sonic.sonic_radius_server:
config:
auth_type: chap
nas_ip: 1.2.3.4
statistics: true
timeout: 10
servers:
host:
- name: localhost
state: deleted
# After state:
# ------------
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 5
#auth-type : pap
#key : chap
#retransmit : 3
#--------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------
#myhost chap local 53 3 23 3 mgmt Ethernet24
# Using deleted
#
# Before state:
# -------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#nas-ip-addr: 1.2.3.4
#statistics : True
#timeout : 10
#auth-type : chap
#key : chap
#retransmit : 3
#--------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------
#localhost mschapv2 local 52 2 20 2 mgmt Ethernet12
#myhost chap local 53 3 23 3 mgmt Ethernet24
#---------------------------------------------------------
#RADIUS Statistics
#---------------------------------------------------------
#
- name: Merge radius configurations
dellemc.enterprise_sonic.sonic_radius_server:
config:
state: deleted
# After state:
# ------------
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 5
#auth-type : pap
# Using merged
#
# Before state:
# -------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#
- name: Merge radius configurations
dellemc.enterprise_sonic.sonic_radius_server:
config:
auth_type: chap
key: chap
nas_ip: 1.2.3.4
statistics: true
timeout: 10
retransmit: 3
servers:
host:
- name: localhost
auth_type: mschapv2
key: local
priority: 2
port: 52
retransmit: 2
timeout: 20
source_interface: Eth 12
vrf: mgmt
state: merged
# After state:
# ------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#nas-ip-addr: 1.2.3.4
#statistics : True
#timeout : 10
#auth-type : chap
#key : chap
#retransmit : 3
#--------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------
#localhost mschapv2 local 52 2 20 2 mgmt Ethernet12
#---------------------------------------------------------
#RADIUS Statistics
#---------------------------------------------------------
#
# Using replaced
#
# Before state:
# -------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 10
#auth-type : pap
#key configured : Yes
#--------------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY-CONFIG AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------------
#1.2.3.4 pap No 49 1 5 - - Ethernet0
#
- name: Replace radius configurations
sonic_radius_server:
config:
auth_type: mschapv2
timeout: 20
servers:
- host:
name: 1.2.3.4
auth_type: mschapv2
key: mschapv2
source_interface: Ethernet12
state: replaced
#
# After state:
# ------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 20
#auth-type : mschapv2
#key configured : No
#--------------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY-CONFIG AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------------
#1.2.3.4 mschapv2 Yes 1812 - - - - Ethernet12
#
# Using overridden
#
# Before state:
# -------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 10
#auth-type : pap
#key configured : Yes
#--------------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY-CONFIG AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------------
#1.2.3.4 pap No 49 1 5 - - Ethernet0
#11.12.13.14 chap Yes 49 10 5 3 - -
#
- name: Override radius configurations
sonic_radius_server:
config:
auth_type: mschapv2
key: mschapv2
timeout: 20
servers:
- host:
name: 1.2.3.4
auth_type: mschapv2
key: mschapv2
source_interface: Ethernet12
- host:
name: 10.10.11.12
auth_type: chap
timeout: 30
priority: 2
port: 49
state: overridden
#
# After state:
# ------------
#
#sonic(config)# do show radius-server
#---------------------------------------------------------
#RADIUS Global Configuration
#---------------------------------------------------------
#timeout : 20
#auth-type : mschapv2
#key configured : Yes
#--------------------------------------------------------------------------------------
#HOST AUTH-TYPE KEY-CONFIG AUTH-PORT PRIORITY TIMEOUT RTSMT VRF SI
#--------------------------------------------------------------------------------------
#1.2.3.4 mschapv2 Yes 1812 - - - - Ethernet12
#10.10.11.12 chap No 49 2 30 - - -
#
返回值
常见的返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
生成的配置模块调用。 返回: 当更改时 示例: |
|
模块调用之前的配置。 返回: 始终 示例: |
|
推送到远程设备的命令集。 返回: 始终 示例: |