cisco.dnac.global_credential_v2 模块 – 全局凭据 V2 资源模块
注意
此模块是 cisco.dnac 集合 (版本 6.25.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.dnac
。您需要满足其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在剧本中使用它,请指定:cisco.dnac.global_credential_v2
。
cisco.dnac 3.1.0 中的新增功能
概要
管理全局凭据 V2 资源的创建、更新和删除操作。
用于创建新的全局凭据的 API。可以一次传递多种类型的多个凭据。请参阅示例请求正文以获取更多信息。
删除全局凭据。只需要传递凭据的“id”。
用于更新设备凭据的 API。可以一次传递多个凭据,但一次只能传递给定类型的一个凭据。请参阅示例请求正文以获取更多信息。
注意
此模块具有相应的 action 插件。
要求
执行此模块的主机需要以下要求。
dnacentersdk >= 2.4.9
python >= 3.5
参数
参数 |
注释 |
---|---|
全局凭据 V2 的 cliCredential。 |
|
CLI 凭据的描述。 |
|
CLI Enable 密码。 |
|
CLI 凭据的 UUID 格式 ID。 |
|
CLI 密码。 |
|
CLI 用户名。 |
|
用于 Cisco DNA Center SDK 的标志,用于启用调试。 选项
|
|
Cisco DNA Center 主机名。 |
|
用于身份验证的 Cisco DNA Center 密码。 |
|
Cisco DNA Center 端口。 默认值: |
|
用于身份验证的 Cisco DNA Center 用户名。 默认值: |
|
启用或禁用 SSL 证书验证的标志。 选项
|
|
告知 SDK 使用哪个版本的 Cisco DNA Center。 默认值: |
|
全局凭据 V2 的 httpsRead。 |
|
HTTP(S) 读取凭据的描述。 |
|
HTTP(S) 读取凭据的 UUID 格式 ID。 |
|
HTTP(S) 读取密码。 |
|
HTTP(S) 端口。 |
|
HTTP(S) 读取用户名。 |
|
全局凭据 V2 的 httpsWrite。 |
|
HTTP(S) 写入凭据的描述。 |
|
HTTP(S) 读取凭据的 UUID 格式 ID。 |
|
HTTP(S) 写入密码。 |
|
HTTP(S) 端口。 |
|
HTTP(S) 写入用户名。 |
|
ID 路径参数。全局凭据 ID。 |
|
全局凭据 V2 的 snmpV2cRead。 |
|
SNMP RO 社区的描述。 |
|
SNMP 读取凭据的 UUID 格式 ID。 |
|
SNMP RO 社区。 |
|
全局凭据 V2 的 snmpV2cWrite。 |
|
SNMP RW 社区的描述。 |
|
SNMP 写入凭据的 UUID 格式 ID。 |
|
SNMP RW 社区。 |
|
全局凭据 V2 的 snmpV3。 |
|
SNMP V3 的身份验证密码。 |
|
SNMP 身份验证协议。“SHA”或“MD5”。 |
|
SNMP V3 凭据的描述。 |
|
SNMP V3 凭据的 UUID 格式 ID。 |
|
SNMP 隐私的隐私密码。 |
|
SNMP 隐私协议。“AES128”、“AES192”、“AES256”。 |
|
SNMP 模式。“AUTHPRIV”或“AUTHNOPRIV”或“NOAUTHNOPRIV”。 |
|
SNMP V3 用户名。 |
|
用于 Cisco DNA Center SDK 的标志,用于启用根据 JSON 模式验证请求正文。 选项
|
备注
注意
使用的 SDK 方法为 discovery.Discovery.create_global_credentials_v2、discovery.Discovery.delete_global_credential_v2、discovery.Discovery.update_global_credentials_v2,
使用的路径为 post /dna/intent/api/v2/global-credential、delete /dna/intent/api/v2/global-credential/{id}、put /dna/intent/api/v2/global-credential,
不支持
check_mode
此插件运行在控制节点上,不使用任何 Ansible 连接插件,而是使用 Cisco DNAC SDK 的嵌入式连接管理器。
以 dnac_ 开头的参数由 Cisco DNAC Python SDK 用于建立连接。
另请参见
另请参见
- Cisco DNA Center 文档,关于 Discovery CreateGlobalCredentialsV2
CreateGlobalCredentialsV2 API 的完整参考。
- Cisco DNA Center 文档,关于 Discovery DeleteGlobalCredentialV2
DeleteGlobalCredentialV2 API 的完整参考。
- Cisco DNA Center 文档,关于 Discovery UpdateGlobalCredentialsV2
UpdateGlobalCredentialsV2 API 的完整参考。
示例
- name: Update all
cisco.dnac.global_credential_v2:
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
cliCredential:
description: string
enablePassword: string
id: string
password: string
username: string
httpsRead:
description: string
id: string
password: string
port: 0
username: string
httpsWrite:
description: string
id: string
password: string
port: 0
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: Create
cisco.dnac.global_credential_v2:
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
cliCredential:
- description: string
enablePassword: string
password: string
username: string
httpsRead:
- description: string
password: string
port: 0
username: string
httpsWrite:
- description: 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: Delete by id
cisco.dnac.global_credential_v2:
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 返回的响应字典或列表。 返回值:始终返回 示例: |