{"id":20588665,"url":"https://github.com/ciscodevnet/ansible-dcnm","last_synced_at":"2025-04-06T16:14:54.965Z","repository":{"id":39747503,"uuid":"221995660","full_name":"CiscoDevNet/ansible-dcnm","owner":"CiscoDevNet","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-06T04:40:05.000Z","size":5200,"stargazers_count":49,"open_issues_count":45,"forks_count":39,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2025-04-06T06:37:46.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-15T20:11:14.000Z","updated_at":"2025-04-04T19:49:47.000Z","dependencies_parsed_at":"2023-10-11T20:20:45.047Z","dependency_job_id":"7ee6d89d-c3cd-4dcc-8766-ee0b9b2f7b92","html_url":"https://github.com/CiscoDevNet/ansible-dcnm","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fansible-dcnm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fansible-dcnm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fansible-dcnm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fansible-dcnm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/ansible-dcnm/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509237,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T07:25:47.853Z","updated_at":"2025-04-06T16:14:54.922Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"Python","readme":"[![Actions Status](https://github.com/CiscoDevNet/ansible-dcnm/workflows/CI/badge.svg)](https://github.com/CiscoDevNet/ansible-dcnm/actions)\n\n\n# Cisco DCNM Collection\n\nThe Ansible Cisco Nexus® Dashboard Fabric Controller (NDFC) (formerly Cisco Data Center Network Manager (DCNM)) collection includes modules to help automate common day 2 operations for VXLAN EVPN fabrics.\n\nThis collection is intended for use with the following release versions:\n  * `DCNM Release 11.4(1)` or later\n  * `NDFC Release 12.0` or later.\n\n\u003c!--start requires_ansible--\u003e\n## Ansible version compatibility\n\nThis collection has been tested against following Ansible versions: **\u003e=2.15.0**.\n\nFor collections that support Ansible 2.9, please ensure you update your `network_os` to use the\nfully qualified collection name (for example, `cisco.ios.ios`).\nPlugins and modules within a collection may be tested with only specific Ansible versions.\nA collection may contain metadata that identifies these versions.\nPEP440 is the schema used to describe the versions of Ansible.\n\u003c!--end requires_ansible--\u003e\n\n### Supported connections\nThe Cisco DCNM collection supports ``httpapi`` connections.\n\n## Included content\n\u003c!--start collection content--\u003e\n### Httpapi plugins\nName | Description\n--- | ---\n[cisco.dcnm.dcnm](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_httpapi.rst)|Ansible DCNM HTTPAPI Plugin.\n\n### Modules\nName | Description\n--- | ---\n[cisco.dcnm.dcnm_bootflash](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_bootflash_module.rst)|Bootflash management for Nexus switches.\n[cisco.dcnm.dcnm_fabric](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_fabric_module.rst)|Manage creation and configuration of NDFC fabrics.\n[cisco.dcnm.dcnm_image_policy](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_image_policy_module.rst)|Image policy management for Nexus Dashboard Fabric Controller\n[cisco.dcnm.dcnm_image_upgrade](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_image_upgrade_module.rst)|Image management for Nexus switches\n[cisco.dcnm.dcnm_image_upload](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_image_upload_module.rst)|DCNM Ansible Module for managing images.\n[cisco.dcnm.dcnm_interface](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_interface_module.rst)|DCNM Ansible Module for managing interfaces.\n[cisco.dcnm.dcnm_inventory](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_inventory_module.rst)|Add and remove Switches from a DCNM managed VXLAN fabric.\n[cisco.dcnm.dcnm_links](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_links_module.rst)|DCNM ansible module for managing Links.\n[cisco.dcnm.dcnm_log](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_log_module.rst)|Log messages according to the configuration pointed to by the environment variable NDFC_LOGGING_CONFIG.\n[cisco.dcnm.dcnm_maintenance_mode](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_maintenance_mode_module.rst)|Manage Maintenance Mode Configuration of NX-OS Switches.\n[cisco.dcnm.dcnm_network](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_network_module.rst)|Add and remove Networks from a DCNM managed VXLAN fabric.\n[cisco.dcnm.dcnm_policy](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_policy_module.rst)|DCNM Ansible Module for managing policies.\n[cisco.dcnm.dcnm_resource_manager](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_resource_manager_module.rst)|DCNM ansible module for managing resources.\n[cisco.dcnm.dcnm_rest](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_rest_module.rst)|Send REST API requests to DCNM controller.\n[cisco.dcnm.dcnm_service_node](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_service_node_module.rst)|Create/Modify/Delete service node based on type and attached interfaces from a DCNM managed VXLAN fabric.\n[cisco.dcnm.dcnm_service_policy](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_service_policy_module.rst)|DCNM ansible module for managing service policies.\n[cisco.dcnm.dcnm_service_route_peering](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_service_route_peering_module.rst)|DCNM Ansible Module for managing Service Route Peerings.\n[cisco.dcnm.dcnm_template](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_template_module.rst)|DCNM Ansible Module for managing templates.\n[cisco.dcnm.dcnm_vpc_pair](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_vpc_pair_module.rst)|DCNM Ansible Module for managing VPC switch pairs required for VPC interfaces.\n[cisco.dcnm.dcnm_vrf](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_vrf_module.rst)|Add and remove VRFs from a DCNM managed VXLAN fabric.\n\n\u003c!--end collection content--\u003e\n\nClick the ``Content`` button to see the list of content included in this collection.\n\n## Installing this collection\n\nYou can install the Cisco DCNM collection with the Ansible Galaxy CLI:\n\n    ansible-galaxy collection install cisco.dcnm\n\nYou can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:\n\n```yaml\n---\ncollections:\n  - name: cisco.dcnm\n    version: 3.7.0\n```\n## Using this collection\n\n\n### Using modules from the Cisco DCNM collection in your playbooks\n\nYou can call modules by their Fully Qualified Collection Namespace (FQCN), such as `cisco.dcnm.dcnm_inventory`.\nThe following example task adds a switch to an existing fabric, using the FQCN:\n\n```yaml\n---\n\n- hosts: dcnm_controllers\n  gather_facts: false\n  connection: ansible.netcommon.httpapi\n\n  vars:\n    password: !vault |\n        $ANSIBLE_VAULT;1.1;AES256\n        32393431346235343736383635656339363132666463316231653862373335356366663561316665\n        3730346133626437383337366664616264656534313536640a303639313666373261633064343361\n        33396463306231313937303766343165333332613636393263343734613136636232636162363639\n        3233353437366362330a623962613031626633396630653530626636383333633065653965383864\n        3165\n\n  tasks:\n    - name: Add switch n9kv-spine1 to fabric vxlan-fabric.\n      cisco.dcnm.dcnm_inventory:\n        fabric: vxlan-fabric\n        state: overridden\n        config:\n        - seed_ip: n9kv-spine1\n          auth_proto: MD5 # choose from [MD5, SHA, MD5_DES, MD5_AES, SHA_DES, SHA_AES]\n          user_name: admin\n          password: \"{{ password }}\"\n          max_hops: 0\n          role: spine # default is Leaf - choose from [leaf, spine, border, border_spine, border_gateway, border_gateway_spine\n                           # super_spine, border_super_spine, border_gateway_super_spine]\n          preserve_config: false # boolean, default is  true\n      vars:\n          ansible_command_timeout: 1000\n          ansible_connect_timeout: 1000\n      no_log: true\n```\n\nAlternately, you can call modules by their short name if you list the `cisco.dcnm` collection in the playbook's `collections`, as follows:\n\n```yaml\n---\n- hosts: dcnm_controllers\n  gather_facts: false\n  connection: httpapi\n\n  collections:\n    - cisco.dcnm\n\n  tasks:\n    - name: Merge a Switch\n      dcnm_inventory:\n        ...parameters...\n```\n\nSample hosts file using the dcnm httpapi connection plugin in either the INI or YAML format.\n\n* Ansible INI Format\n\n```ini\n[dcnm_controllers]\n192.168.2.10\n\n[dcnm_controllers:vars]\nansible_user=dcnm_username\nansible_ssh_pass=dcnm_password\nansible_network_os=cisco.dcnm.dcnm\nansible_httpapi_validate_certs=False\nansible_httpapi_use_ssl=True\nansible_httpapi_login_domain=local\n```\n\n* Ansible YAML Format\n\n```yaml\nall:\n  vars:\n    ansible_user: \"dcnm_username\"\n    ansible_password: \"dcnm_password\"\n    ansible_python_interpreter: python\n    ansible_httpapi_validate_certs: False\n    ansible_httpapi_use_ssl: True\n    ansible_httpapi_login_domain: local\n  children:\n    dcnm_controllers:\n      hosts:\n        192.168.2.10:\n           ansible_network_os: cisco.dcnm.dcnm\n```\n\n### See Also:\n\n* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.\n\n## Contributing to this collection\n\nOngoing development efforts and contributions to this collection are solely focused on enhancements to current dcnm modules, additional dcnm modules and enhancements to the connection plugin.\n\nWe welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco DCNM collection repository](https://github.com/CiscoDevNet/ansible-dcnm/issues).\n\n## Changelogs\n\n* [Changelog](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/CHANGELOG.rst)\n\n## More information\n\n- [DCNM installation and configuration guides](https://www.cisco.com/c/en/us/support/cloud-systems-management/prime-data-center-network-manager/products-installation-and-configuration-guides-list.html)\n- [NDFC installation and configuration guides](https://www.cisco.com/c/en/us/td/docs/dcn/ndfc/1201/installation/cisco-ndfc-install-and-upgrade-guide-1201.html)\n- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)\n- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)\n\n## Licensing\n\nCopyright (c) 2020-2025 Cisco and/or its affiliates.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fansible-dcnm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciscodevnet%2Fansible-dcnm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fansible-dcnm/lists"}