cisco.dnac.device_credential_v1 模块 – 设备凭证 V1 的资源模块
注意
此模块是 cisco.dnac 集合(版本 6.25.0)的一部分。
如果您使用的是 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.dnac
。您需要其他要求才能使用此模块,请参阅 要求 了解详细信息。
要在 Playbook 中使用它,请指定:cisco.dnac.device_credential_v1
。
cisco.dnac 3.1.0 中的新增功能
概要
管理资源设备凭证 V1 的创建、更新和删除操作。
用于创建设备凭证的 API。此 API 已被弃用,并且在 2024 年 8 月 1 日 23:59:59 GMT 之后的 Cisco DNA Center 版本中将不可用。请参考新的 Intent API 创建全局凭证 V2。
删除设备凭证。此 API 已被弃用,并且在 2024 年 8 月 1 日 23:59:59 GMT 之后的 Cisco DNA Center 版本中将不可用。请参考新的 Intent API 删除全局凭证 V2。
用于更新设备凭证的 API。此 API 已被弃用,并且在 2024 年 8 月 1 日 23:59:59 GMT 之后的 Cisco DNA Center 版本中将不可用。请参考新的 Intent API 更新全局凭证 V2。
注意
此模块具有相应的 操作插件。
要求
执行此模块的主机需要满足以下要求。
dnacentersdk >= 2.4.9
python >= 3.5
参数
参数 |
注释 |
---|---|
用于 Cisco DNA Center SDK 以启用调试的标志。 选择
|
|
Cisco DNA Center 主机名。 |
|
用于身份验证的 Cisco DNA Center 密码。 |
|
Cisco DNA Center 端口。 默认值: |
|
用于身份验证的 Cisco DNA Center 用户名。 默认值: |
|
用于启用或禁用 SSL 证书验证的标志。 选择
|
|
通知 SDK 要使用的 Cisco DNA Center 版本。 默认值: |
|
Id 路径参数。全局凭证 id。 |
|
设备凭证的设置。 |
|
设备凭证的 cliCredential。 |
|
CLI 凭证的名称或描述。 |
|
CLI 凭证的启用密码。 |
|
CLI 凭证的密码。 |
|
CLI 凭证的用户名。 |
|
设备凭证的 httpsRead。 |
|
http 读取凭证的名称或描述。 |
|
http 读取凭证的密码。 |
|
http 读取凭证的端口。 |
|
http 读取凭证的用户名。 |
|
设备凭证的 httpsWrite。 |
|
http 写入凭证的名称或描述。 |
|
http 写入凭证的密码。 |
|
http 写入凭证的端口。 |
|
http 写入凭证的用户名。 |
|
设备凭证的 snmpV2cRead。 |
|
snmp v2 读取的描述。 |
|
snmp v2 读取凭证的读取团体。 |
|
设备凭证的 snmpV2cWrite。 |
|
snmp v2 写入的描述。 |
|
snmp v2 写入凭证的写入团体。 |
|
设备凭证的 snmpV3。 |
|
snmpv3 凭证的身份验证密码。 |
|
snmpv3 凭证的身份验证类型。 |
|
SNMPV3 凭证的名称或描述。 |
|
snmpv3 凭证的隐私密码。 |
|
snmpv3 凭证的隐私类型。 |
|
snmpv3 凭证的模式。 |
|
SNMPv3 凭证的用户名。 |
|
用于 Cisco DNA Center SDK 以启用针对 JSON 架构验证请求主体的标志。 选择
|
注释
注意
使用的 SDK 方法是 network_settings.NetworkSettings.create_device_credentials_v1、network_settings.NetworkSettings.delete_device_credential_v1、network_settings.NetworkSettings.update_device_credentials_v1,
使用的路径是 post /dna/intent/api/v1/device-credential、delete /dna/intent/api/v1/device-credential/{id}、put /dna/intent/api/v1/device-credential,
不支持
check_mode
该插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco DNAC SDK 中的嵌入式连接管理器
以 dnac_ 开头的参数由 Cisco DNAC Python SDK 用于建立连接。
另请参阅
另请参阅
- Cisco DNA Center 文档,关于网络设置 CreateDeviceCredentialsV1
CreateDeviceCredentialsV1 API 的完整参考。
- Cisco DNA Center 文档,关于网络设置 DeleteDeviceCredentialV1
DeleteDeviceCredentialV1 API 的完整参考。
- Cisco DNA Center 文档,关于网络设置 UpdateDeviceCredentialsV1
UpdateDeviceCredentialsV1 API 的完整参考。
示例
- name: Create
cisco.dnac.device_credential_v1:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
settings:
cliCredential:
- description: string
enablePassword: string
password: string
username: string
httpsRead:
- name: string
password: string
port: 0
username: string
httpsWrite:
- name: string
password: string
port: 0
username: string
snmpV2cRead:
- description: string
readCommunity: string
snmpV2cWrite:
- description: string
writeCommunity: string
snmpV3:
- authPassword: string
authType: string
description: string
privacyPassword: string
privacyType: string
snmpMode: string
username: string
- name: Update all
cisco.dnac.device_credential_v1:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
settings:
cliCredential:
description: string
enablePassword: string
id: string
password: string
username: string
httpsRead:
id: string
name: string
password: string
port: string
username: string
httpsWrite:
id: string
name: string
password: string
port: string
username: string
snmpV2cRead:
description: string
id: string
readCommunity: string
snmpV2cWrite:
description: string
id: string
writeCommunity: string
snmpV3:
authPassword: string
authType: string
description: string
id: string
privacyPassword: string
privacyType: string
snmpMode: string
username: string
- name: Delete by id
cisco.dnac.device_credential_v1:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: absent
id: string
返回值
常见返回值已在此处记录 这里,以下是此模块特有的字段
键 |
描述 |
---|---|
一个字典或列表,包含 Cisco DNAC Python SDK 返回的响应 返回: 始终 示例: |