04-29-2021 06:13 AM - edited 04-29-2021 06:15 AM
I have an on premise CML-P 2.1 running.
Everything works fine and also briding with the external network via a custom bridge is not a problem.
But I try to use the "cmlutils" (https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/virlutils/) to generate an inventory file for Ansible (cml generate ansible). The result is each time empty. There is only the Ansible group "all:", but nothing else.
# virlutils generated ansible file for lab id: ffb2e4, title: topo.yaml # # the overall structure of the inventory follows best practices # at http://docs.ansible.com/ansible/latest/intro_inventory.html # we've rendered what we think is best if you disagree, override # virl.generators.ansible_inventory_generator # you can modify grouping behavior by adding a tag to your nodes: # ansible_group=GROUP_NAME all:
I tried a lot of things like configuring a Management IP address on the nodes but with no success.
The command "cml generate pyats" does work, but I want to use Ansible...
Can someone help me with this?
11-30-2021 04:52 AM - edited 12-04-2021 10:06 AM
It might be helpful. Check out this note :
"NOTE: if the ansible_group tag is not specified for a node, that node will not be included during inventory generation. Additionally, CML needs to know each node's management IP address before it will be placed into the inventory file"
Update: successful generation of inventory requires two conditions:
BUT! Cmlutils detects management IP address in very weird way. While there is an actual IPv4 address of the interface present in the column "L3 address" of the "cml nodes" command output, the ansible inventory generation is successful. The main issue is "L3 address" exists in that column only about 10min or so after the node status changed to "BOOTED" and then it disappears. Check the attached screenshot.
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