cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
923
Views
0
Helpful
4
Replies
Highlighted

Automating via Ansible the creation of ACI Leaf Interface Profiles?

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?

4 REPLIES 4
Highlighted
Cisco Employee

Hello,

 

I believe you are looking for this module.

 

https://docs.ansible.com/ansible/latest/modules/aci_interface_policy_leaf_profile_module.html

 

 

Highlighted

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? 

 

https://docs.ansible.com/ansible/latest/modules/aci_access_port_block_to_access_port_module.html#aci-access-port-block-to-access-port-module

Highlighted

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: 

 

https://docs.ansible.com/ansible/latest/modules/aci_access_port_to_interface_policy_leaf_profile_module.html?highlight=interface%20policy%20group

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 

 

Highlighted
Beginner

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. 

 

 

 

 

Content for Community-Ad