cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
129
Views
0
Helpful
3
Replies

Ansible For Cisco Modelling Lab

diogopxo
Level 1
Level 1

I am new to CML.Is there any prerequisite set up for ansible and CML reachability. Can someone please tell how to reach CML devices via Ansible?

3 Replies 3

Ruben Cocheno
Spotlight
Spotlight

@diogopxo 

There are a few examples here as far as I recall

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/

Hey @diogopxo  here are a few things to consider for Ansible to reach devices within a Cisco CML environment:

For prerequisites, Ansible and cisco.ios collection: Ensure you have Ansible installed and the cisco.ios collection is available. You can check for the collection with ansible-galaxy collection list and install it using ansible-galaxy collection install cisco.ios if needed. Depending if you are are using CML on the sandbox on your local machine, your Ansible control machine will need have direct network access to the CML devices, as such In this case, you can use the device IP addresses directly in your Ansible playbooks

Take look at these resource

https://blogs.cisco.com/learning/how-to-use-ansible-with-cml

https://github.com/CiscoDevNet/ansible-cml

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Jesus Illescas
Cisco Employee
Cisco Employee

The main prerequisite is IP reachability. If ansible can connect to CML, then is just a matter of using a collection like cisco.cml and the right credentials. From there you can create/update topologies.

If you are looking to manage devices inside CML via Ansible, then the easiest way is to use a external bridge connector on CML https://www.cisco.com/c/en/us/td/docs/cloud_services/cisco_modeling_labs/v200/configuration/guide/b_cml_user_guide_2-0/m_external_connectivity.html