cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
197
Views
0
Helpful
1
Replies

ACI Ansible Automation

joeharb
Level 5
Level 5

I am working on an ansible playbook that will do the following:

Set the interface description, create a Access Port Selector for the proper port and associate it with a Interface Policy Group and then deploy a static port with the proper untagged VLAN.

User input determines Leaf/Inteface/Description but what I am struggling with is being able to pull the the App and Epg while supplying the VLAN.

We use the cli command "show vlan-domain name DOMAIN_NAME vlan VLAN" to get this information as it output the Tenant/App/Epg, is there any module that can provide this information or even a rest call?

At this point if I statically define those values the playbook works but I would prefer that it be able to query for this information by simply providing the vlan while executing the playbook.

Thanks,

Joe

1 Reply 1

I would suggest looking using the REST API as this is more reliable than trying to parse CLI output. I think might be /api/class/vlanCktEp.json and the endpoint should provide your information about VLAN to EPG mappings.

Hope this helps.

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

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License