04-16-2024 01:01 AM
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?
04-16-2024 01:06 AM
There are a few examples here as far as I recall
04-16-2024 02:42 AM
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.
04-17-2024 07:21 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide