The ansible-mso
project provides an Ansible collection for managing and automating your Cisco ACI Multi-Site or Nexus Dashboard Orchestrator environments.
It consists of a set of modules and roles for performing tasks related to ACI Multi-Site.
See the cisco.mso collection index for a full list of modules and plugins.
Note: The Nexus Dashboard (ND) HTTPAPI connection plugin should be used when Cisco ACI Multi-Site is installed on Nexus Dashboard (v3.2+) or when using this collection with Nexus Dashboard Orchestrator (v3.6+).
- Ansible v2.15 or newer
- Python v3.10 or newer
Follow the Installing Ansible guide for detailed instructions.
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install cisco.mso
You can also include this collection in a requirements.yml file and install it with:
ansible-galaxy collection install -r requirements.yml
Using the following requirements.yml
format:
collections:
- name: cisco.mso
Note that if you install any collections from Ansible Galaxy, they will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install cisco.mso --upgrade
You can also install a specific version of the collection. For example, to install version 1.0.0, use the following syntax:
ansible-galaxy collection install cisco.mso:==1.0.0
See using Ansible collections for more details.
Install the Nexus Dashboard (ND) collection when Cisco ACI Multi-Site is installed on Nexus Dashboard (v3.2+) or when using this collection with Nexus Dashboard Orchestrator (v3.6+)
ansible-galaxy collection install cisco.nd
Follow these instructions to get the latest collection.
Clone the ansible-mso
repository.
git clone https://github.com/CiscoDevNet/ansible-mso.git
Go to the ansible-mso
directory
cd ansible-mso
Pull the latest master on your mso
git pull origin master
Build and Install a collection from source
ansible-galaxy collection build --force
ansible-galaxy collection install cisco-mso-* --force
Go to ansible-mso Actions and select the latest CI build.
Under Artifacts download collection suffixed with the latest version of Ansible (eg. collection-stable-2.17
) and unzip it using Terminal or Console.
Note: The collection file is a zip file containing a tar.gz file. We recommend using CLI because some GUI-based unarchiver might unarchive both nested archives in one go.
Install the unarchived tar.gz file
ansible-galaxy collection install cisco-mso-1.0.0.tar.gz —-force
Once the collection is installed, you can use it in a playbook by specifying the full namespace path to the module, plugin and/or role.
- hosts: mso
gather_facts: no
tasks:
- name: Add a new site EPG
cisco.mso.mso_schema_site_anp_epg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema1
site: Site1
template: Template1
anp: ANP1
epg: EPG1
state: present
You can use the MSO HTTPAPI connection plugin by setting the following variables in your inventory file (cisco.mso collection v1.2+).
ansible_connection=ansible.netcommon.httpapi
ansible_network_os=cisco.mso.mso
The HTTPAPI connection plugin will also allow you to specify additional parameters as variable and omit them from the task itself. Module parameters will override global variables.
ansible_host=10.0.0.1
ansible_user=admin
ansible_ssh_pass="MySuperPassword"
ansible_httpapi_validate_certs=False
ansible_httpapi_use_ssl=True
ansible_httpapi_use_proxy=True
You should use the Nexus Dashboard (ND) collection plugin, which is available in the cisco.nd collection, when Cisco ACI Multi-Site is installed on Nexus Dashboard (v3.2+) or when using this collection with Nexus Dashboard Orchestrator (v3.6+) by changing the following variables.
ansible_connection=ansible.netcommon.httpapi
ansible_network_os=cisco.nd.nd
ansible_httpapi_use_ssl=True
Integration tests for each module in the cisco.mso
collection are executed on the following Nexus Dashboard Orchestrator versions:
- 3.7
- 4.1
- 4.2
- 4.3
Ongoing development efforts and contributions to this collection are tracked as issues in this repository.
We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the Cisco MSO collection repository.
This collection supports any MSO/NDO version within the Last Day of Support (LDOS) date.
Certain modules and options in the collection are only available from specific versions of MSO/NDO. The versions that a module or option supports are documented in the individual module documentation.
To find EOL announcements for MSO/NDO versions, refer to the End-of-Life and End-of-Sale Notices page.
See the Changelog for full release notes.
For further information, refer to the following:
- Automating Cisco MSO with Ansible Learning Lab
- Nexus Dashboard Orchestrator Overview
- Nexus Dashboard Orchestrator Support Documentation
- Nexus Dashboard Orchestrator API Release Notes
This collection is licensed under the GNU General Public License v3.0