The Ansible Ciena MCP collection includes a variety of Ansible content to help automate the management of Ciena MCP network management system.
This collection has been tested against MCP 4.2
This collection has been tested against following Ansible versions: >=2.9.10,<2.11.
Name | Description |
---|---|
[ciena.mcp.application_slices] | Handle resource of type application_slices |
[ciena.mcp.discovery] | management sessions and neprofiles |
[ciena.mcp.domains] | domains data |
[ciena.mcp.mcpview] | TAPI |
[ciena.mcp.products] | orchestration products |
[ciena.mcp.resources] | orchestration resources |
[ciena.mcp.tapi_xxxx] | TAPI |
[ciena.mcp.nsi_api_fres] | FREs |
Install the Ciena MCP collection with the Ansible Galaxy CLI:
ansible-galaxy collection install ciena.mcp
You can also include it in a requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: ciena.mcp
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as ciena.mcp.resources
.
---
- name: playbook get vars for lab localhost facts
import_playbook: lab_get_vars.yml
when: hostvars['localhost'].lab_vars is not defined
- hosts:
- localhost
vars:
devices:
- 10.20.10.1
- 10.20.10.2
- 10.20.10.3
- 10.20.10.4
mcp_creds: &mcp_creds
mcp_hostname: 10.10.10.10
mcp_username: admin
mcp_password: adminpw
name: Enroll Devices in MCP
collections:
- ciena.mcp
gather_facts: false
tasks:
- name: list getNEConnectionProfiles
discovery_api_neprofiles:
<<: *mcp_creds
state: get
- name: createNEConnectionProfile
discovery_api_neprofiles:
<<: *mcp_creds
state: post
data:
type: neConnectionProfile
attributes:
name: saos10
profileDescription: saos10
typeGroup: "/typeGroups/PN10x"
isEnabled: true
isDefault: false
protocolEndpoints:
cli:
connection:
hostport: 22
authentication:
username: diag
password: ciena123
netconf:
connection:
hostport: 830
authentication:
username: diag
password: ciena123
register: connectionProfile
- name: debug
debug:
var: connectionProfile
- name: Create Management Session
loop: "{{ devices }}"
discovery_api_managementsessions:
<<: *mcp_creds
state: post
data:
attributes:
ipAddress: "{{ devices }}"
profile: "{{ connectionProfile.data.id }}"
resourcePartitionInfo: []
additionalIpAddresses: []
type: managementSessions
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Ciena MCP collection repository.
Release is done automatically use Github Actions as part of merging to master.
- build a roadmap
- Ansible network resources
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
See LICENSE to see the full text.