DEPRECATED: This collection is deprecated and will be removed in a future release. Please migrate to cisco.catalystcenter, which provides the same functionality under the updated Cisco Catalyst Center branding.
The cisco.dnac Ansible Collection enables enterprise automation and management of Cisco CATALYST Center environments. It provides modules that interact with Cisco CATALYST Center APIs to automate provisioning, configuration, and operational workflows.
This collection is available on both Ansible Galaxy and Red Hat Automation Hub.
The following table shows the supported versions.
| Cisco DNA Center version | Ansible cisco.dnac version | Python dnacentersdk version |
|---|---|---|
| 2.3.5.3 | 6.13.3 | 2.6.11 |
| 2.3.7.6 | 6.25.0 | 2.8.3 |
| 2.3.7.7 | 6.30.2 | 2.8.6 |
| 2.3.7.9 | 6.33.2 | 2.8.6 |
| 3.1.3.0 | 6.45.0 | 2.10.6 |
| 3.1.6.0 | 6.47.x | 2.11.x |
If your Ansible collection is older please consider updating it first.
Notes:
- The "Python 'dnacentersdk' version" column lists the minimum recommended SDK used during testing; later SDK releases are usually compatible.
- The "Cisco DNA Center version" column has the value of the
versionyou should use for the Ansible collection.
- Python >= 3.9
- dnacentersdk (see Compatibility Matrix for tested versions)
- ansible-core >= 2.15
Note: ansible-core is provided through Red Hat Ansible Automation Platform Execution Environments or can be installed via standard enterprise channels. Manual installation is not required for certified environments.
Install the collection from Ansible Galaxy:
ansible-galaxy collection install cisco.dnacTo upgrade to the latest version:
ansible-galaxy collection install cisco.dnac --upgradeInstall the Python SDK:
pip install dnacentersdkConnection details can be provided via environment variables or Ansible variable files. See the examples directory for sample playbooks and variable files.
First, export the environment variables where you specify your CATALYST Center credentials as ansible variables:
export DNAC_HOST=<A.B.C.D>
export DNAC_PORT=443 # optional, defaults to 443
export DNAC_USERNAME=<username>
export DNAC_PASSWORD=<password>
export DNAC_VERSION=3.1.6.0 # optional, see the Compatibility Matrix
export DNAC_VERIFY=False # optional, defaults to True
export DNAC_DEBUG=False # optional, defaults to FalseCreate a hosts (example) file that uses [dnac_servers] with your Cisco CATALYST Center Settings:
[dnac_servers]
dnac_serverThen, create a playbook myplaybook.yml (example) specifying the full namespace path to the module, plugin and/or role. The module will read connection details from the environment variables above:
- hosts: dnac_servers
gather_facts: false
tasks:
- name: Create tag with name "MyNewTag"
cisco.dnac.tag:
state: present
description: My Tag
name: MyNewTag
register: resultExecute the playbook:
ansible-playbook -i hosts myplaybook.ymlFirst, define a credentials.yml (example) file where you specify your CATALYST Center credentials as Ansible variables:
---
# DNA Center connection variables
dnac_host: <A.B.C.D>
dnac_port: 443
dnac_username: <username>
dnac_password: <password>
dnac_version: 3.1.6.0
dnac_verify: False
dnac_debug: FalseCreate a hosts (example) file that uses [dnac_servers] with your Cisco CATALYST Center Settings:
[dnac_servers]
dnac_serverThen, create a playbook myplaybook.yml (example) referencing the variables in your credentials.yml file and specifying the full namespace path to the module, plugin and/or role:
- hosts: dnac_servers
vars_files:
- playbooks/credentials.yml
gather_facts: false
tasks:
- name: Create tag using vars_file
cisco.dnac.tag:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
state: present
description: My Tag
name: MyNewTag
register: resultExecute the playbook as usual:
ansible-playbook -i hosts myplaybook.ymlIn the playbooks directory you can find more examples and use cases.
This collection supports automation scenarios such as:
- Automating device and site configuration through Cisco CATALYST Center APIs.
- Managing tags, sites, templates, and policies programmatically.
- Querying inventory and operational data for reporting and validation workflows.
- Integrating Cisco CATALYST Center operations into CI/CD or ITSM workflows.
- Standardizing repeatable infrastructure changes using playbooks.
This collection is validated against the following environments:
- Cisco DNA Center: 2.3.5.3, 2.3.7.6, 2.3.7.9, 3.1.3.0, 3.1.6.0
- ansible-core: >= 2.15
- Python: >= 3.9
Known limitations and compatibility notes are documented in the changelog. For platform-specific issues, consult the official documentation or open a support case as appropriate.
Contributions are welcome. Please open issues or pull requests via the Cisco DNA Center Ansible collection repository. All contributors must adhere to the project's Code of Conduct.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
This collection is available on both Ansible Galaxy and Red Hat Automation Hub.
For certified content obtained from Red Hat Automation Hub, support is provided through Red Hat Ansible Automation Platform according to your subscription agreement.
For content obtained from Ansible Galaxy, community support may be available via:
Please consult your platform documentation for support eligibility and procedures.
Release notes are maintained in the public changelog: https://github.com/cisco-en-programmability/dnacenter-ansible/blob/main/changelogs/changelog.yaml
This collection follows Semantic Versioning. For roadmap information, refer to the repository or contact Cisco for enterprise roadmap details.
- https://github.com/cisco-en-programmability/dnacentersdk
- https://docs.ansible.com/ansible/latest/user_guide/collections_using.html
- https://github.com/cisco-en-programmability/dnacenter-ansible
This collection is licensed under the Cisco Sample Code License.
The full license text is available at: https://github.com/cisco-en-programmability/dnacenter-ansible/blob/main/LICENSE
The license is included in the distributed collection artifact.