cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2403
Views
10
Helpful
3
Replies

Proper way to create Leaf Port Selectors with Ansible

AJ Cruz
Level 3
Level 3

Is anyone familiar with how to create port selectors in ACI using Ansible?

 

I am using the cisco.aci collection.

There are two modules:

aci_access_port_to_interface_policy_leaf_profile

aci_access_port_block_to_access_port

 

I'm confused about when to use one vs the other.

The former has parameters that in the documentation are flagged as "deprecated" and the recommendation is to use the latter.

However the latter has no parameter for selecting an Interface Policy Group.

 

I've tried using both, I've even tried aci_rest to create them. They create just fine but when I try to create a static port in an EPG, any PC or VPC policy groups do not show in the drop down. Even if I delete them and re-create them manually they do not show. However, if I manually create a brand new one (named differently), they show up in the dropdown.

1 Accepted Solution

Accepted Solutions

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @AJ Cruz 

I am using aci_rest for most access policies. I remember I had similar problems, especially with pc/vpc policies, but there were some mapping between objects missing and this is why I was not seeing them in EPG static bind selection drop down.

Here is the role I am using:

https://github.com/msdaniluk/aci_tenantbooks/blob/master/roles/datacenter.aci-model/tasks/main-json.yml 

It's a modified version of this one: https://github.com/datacenter/ansible-role-aci-model 

 

Hope it helps,

Sergiu

 

P.S. please do not judge the repo - it's just something I made to automate my lab ^_^

View solution in original post

3 Replies 3

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @AJ Cruz 

I am using aci_rest for most access policies. I remember I had similar problems, especially with pc/vpc policies, but there were some mapping between objects missing and this is why I was not seeing them in EPG static bind selection drop down.

Here is the role I am using:

https://github.com/msdaniluk/aci_tenantbooks/blob/master/roles/datacenter.aci-model/tasks/main-json.yml 

It's a modified version of this one: https://github.com/datacenter/ansible-role-aci-model 

 

Hope it helps,

Sergiu

 

P.S. please do not judge the repo - it's just something I made to automate my lab ^_^

That was helpful thanks.

I have a repo based on the same role :D

I found a couple issues with my payload looking at yours.

Happy to hear that it helped :-)

 

Cheers,

Sergiu