cisco.catalystcenter.global_credentials module -- Resource module for Global Credentials
Note
This module is part of the cisco.catalystcenter collection (version 2.12.0).
To install it, use: ansible-galaxy collection install cisco.catalystcenter.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.catalystcenter.global_credentials.
New in cisco.catalystcenter 2.3.0
Synopsis
Manage operations create, update and delete of the resource Global Credentials.
API to add new global credential.
API to delete global credential by the given identifier.
API to update the global credential by the given identifier.
Note
This module has a corresponding action plugin.
Requirements
The below requirements are needed on the host that executes this module.
catalystcentersdk >= 3.2.3.0.0
python >= 3.12
Parameters
Parameter |
Comments |
|---|---|
Authentication password for SNMP. Required if the authentication type is specified. Passwords must contain minimum 8 characters and cannot contain spaces or angle brackets(<>). For wireless devices password of length 12 to 31 characters is required. |
|
SNMP authentication type. Required if the SNMP security mode is `AUTHPRIV` or `AUTHNOPRIV`. | SNMP authentication type| Description | |----------------------|-------------| |\`SHA\` | The device will be authenticated using SHA. | |\`MD5\` | The device will be authenticated using MD5.| |\`SHA256\` | The device will be authenticated using SHA256.|. |
|
Flag for Cisco Catalyst Center SDK to enable debugging. Choices: |
|
The Cisco Catalyst Center hostname. |
|
The Cisco Catalyst Center password to authenticate. |
|
The Cisco Catalyst Center port. Default: :ansible-option-default:`443` |
|
The Cisco Catalyst Center username to authenticate. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Informs the SDK which version of Cisco Catalyst Center to use. Default: :ansible-option-default:`"3.1.6.0"` |
|
Description for NETCONF credential. |
|
CLI Enable Password. Passwords cannot contain spaces or angle brackets(<>). |
|
Id path parameter. Unique identifier of the global credential. |
|
Security level that an SNMP message requires. | Mode| Description | |----------------------|-------------| |\`AUTHPRIV\` | The device will be authenticated using security mode AUTHPRIV. | |\`AUTHNOPRIV\` | The device will be authenticated using security mode AUTHNOPRIV.| |\`NOAUTHNOPRIV\` | The device will be authenticated using security mode NOAUTHNOPRIV.|. |
|
HTTP(S) write password. Passwords cannot contain spaces or angle brackets(<>). |
|
NETCONF port of the device. |
|
SNMP privacy password. Required if the privacy type is specified. Passwords must contain minimum 8 characters and cannot contain spaces or angle brackets(<>). For wireless devices password of length 12 to 31 characters is required. |
|
SNMP privacy type. Required if the SNMP mode is `AUTHPRIV`. | SNMP privacy type | Description | |------------------------------|--------------| | `AES128` | AES128 algorithm used for encryption. | | `AES192`| AES192 algorithm used for encryption. | | `AES256` | AES256 algorithm used for encryption.| | `CISCOAES192` | CISCOAES192 algorithm used for encryption.| | `CISCOAES256` | CISCOAES256 algorithm used for encryption.|. |
|
HTTP protocol. Compute device require HTTPS. |
|
Read-only community string password used to view SNMP information on the device. Passwords cannot contain spaces or angle brackets(<>). |
|
Type of the credential. This attribute should not be provided as part of PUT API call, as `type` cannot be updated for credential. |
|
HTTP(S) write username. |
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
|
Read-write community string used to read and write SNMP information. Passwords cannot contain spaces or angle brackets(<>). |
Notes
Note
SDK Method used are network_settings.NetworkSettings.adds_new_global_credential, network_settings.NetworkSettings.delete_global_credential_by_the_given_identifier, network_settings.NetworkSettings.update_global_credential_by_the_given_identifer,
Paths used are post /dna/intent/api/v1/globalCredentials, delete /dna/intent/api/v1/globalCredentials/{id}, put /dna/intent/api/v1/globalCredentials/{id},
Does not support
check_modeThe plugin runs on the control node and does not use any ansible connection plugins,
but instead uses the embedded connection manager from Cisco CATALYST SDK
Requires Python >= 3.10, matching the controller Python versions supported by the collection's minimum ansible-core version (see the collection README for the current ansible-core / Python compatibility range)
See Also
See also
- Cisco Catalyst Center documentation for Network Settings AddsNewGlobalCredential
Complete reference of the AddsNewGlobalCredential API.
- Cisco Catalyst Center documentation for Network Settings DeleteGlobalCredentialByTheGivenIdentifier
Complete reference of the DeleteGlobalCredentialByTheGivenIdentifier API.
- Cisco Catalyst Center documentation for Network Settings UpdateGlobalCredentialByTheGivenIdentifer
Complete reference of the UpdateGlobalCredentialByTheGivenIdentifer API.
Examples
---
- name: Delete by id
cisco.catalystcenter.global_credentials:
catalystcenter_host: "{{catalystcenter_host}}"
catalystcenter_username: "{{catalystcenter_username}}"
catalystcenter_password: "{{catalystcenter_password}}"
catalystcenter_verify: "{{catalystcenter_verify}}"
catalystcenter_port: "{{catalystcenter_port}}"
catalystcenter_version: "{{catalystcenter_version}}"
catalystcenter_debug: "{{catalystcenter_debug}}"
state: absent
id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- name: Update by id
cisco.catalystcenter.global_credentials:
catalystcenter_host: "{{catalystcenter_host}}"
catalystcenter_username: "{{catalystcenter_username}}"
catalystcenter_password: "{{catalystcenter_password}}"
catalystcenter_verify: "{{catalystcenter_verify}}"
catalystcenter_port: "{{catalystcenter_port}}"
catalystcenter_version: "{{catalystcenter_version}}"
catalystcenter_debug: "{{catalystcenter_debug}}"
state: present
authPassword: string
authType: string
description: string
enablePassword: string
id: string
mode: string
password: string
port: string
privacyPassword: string
privacyType: string
protocol: string
readCommunity: string
type: string
username: string
writeCommunity: string
- name: Create
cisco.catalystcenter.global_credentials:
catalystcenter_host: "{{catalystcenter_host}}"
catalystcenter_username: "{{catalystcenter_username}}"
catalystcenter_password: "{{catalystcenter_password}}"
catalystcenter_verify: "{{catalystcenter_verify}}"
catalystcenter_port: "{{catalystcenter_port}}"
catalystcenter_version: "{{catalystcenter_version}}"
catalystcenter_debug: "{{catalystcenter_debug}}"
state: present
authPassword: string
authType: string
description: string
enablePassword: string
id: string
mode: string
password: string
port: string
privacyPassword: string
privacyType: string
protocol: string
readCommunity: string
type: string
username: string
writeCommunity: string
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A dictionary or list with the response returned by the Cisco Catalyst Center Python SDK Returned: always Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}` |