10-01-2019 07:17 AM
Hello Community,
This is my first post and I need to know how to automate a portion of the our infrastructure in ACI, mainly the creation of leaf interface profiles. I didn't see any Ansible modules that would allow me to do so, listed on their website, but maybe I am just missing it. I am not all that great at Python, though I can code.
Anyone have a suggestion on how to address this?
10-01-2019 07:51 AM
Hello,
I believe you are looking for this module.
https://docs.ansible.com/ansible/latest/modules/aci_interface_policy_leaf_profile_module.html
10-01-2019 08:16 AM
I noticed this before but I didn't see any indication on how to indicate which tenant to apply this leaf interface profile object under. Also if I wanted to associate a physical port to the leaf profile object via an access port selector would this module accomplish that?
10-04-2019 04:04 AM
At the first step you didn't apply Leaf Interface Profile under a tenant. The first creation is tenant independent.
After creating your profiles you should also create an interface policy group. Under Leaf interface Profile there are the access port selectors. This is the place where you bind the interface policy group. You will find it here:
Under parameters there is the policy_group. This in turn has an association the the AAEP which binds to your tenant.
Hope this helps
Udo
10-16-2019 07:18 AM
I have a suggestion but it would require you to develop the creation of Leaf interface profiles using the Cisco ACI API with Cobra.
Some high-level assumptions:
Install ansible
install cobra sdk on ansible controller
create ACI Leaf interface profile python script with Cobra SDK
Run ansible and call external script as a command to run again ACI.
I have not tried this but its worth looking into.
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