cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2261
Views
0
Helpful
4
Replies

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

aleccham
Cisco Employee
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

 

 

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

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 

 

juan-ruiz
Level 1
Level 1

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. 

 

 

 

 

Review Cisco Networking for a $25 gift card

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