# Cisco.aci.aci access port to interface policy leaf profile: doesn't work to update FEX ports

**URL:** <https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939>\
**Category:** Get Help\
**Tags:** cisco, playbook, network\
**Created:** [September 19, 2023, 9:33pm UTC](https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939 "2023-09-19T21:33:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![craymond422](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@craymond422](https://forum.ansible.com/u/craymond422)\
**Post date:** [September 19, 2023, 9:33pm UTC](https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939/1 "2023-09-19T21:33:31Z")

</div>

This playbook will update ports on a Leaf interface profile but doesn’t work when attempting to update ports on a FEX connected to a leaf:  
Here’s the playbook:

```auto

- name: "Bind Interface Selectors to Leaf Interface Policy Groups"
  hosts: ACIHosts
  gather_facts: no
  vars_files: 
    - my_vault.yml
    - My_Port_Profile_Kleaf221-FEX151-Copper-adds-test.yml
    
  tasks: 
    - name: Association
      cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
        host: apic1.company.com
        username: "{{ ansible_ssh_user }}"
        password: "{{ ansible_ssh_pass }}"
        interface_profile: Kleaf221_FEX151_IntProf 
        #fex_profile: fexprof-Kleaf221_FEX151_IntProf <----------Ansible states this is an invalid parameter
        access_port_selector: "{{ item.access_port_selector }}"
        port_blk: "{{ item.port_blk }}"
        leaf_port_blk_description: "{{ item.leaf_port_blk_description }}"
        from_port: "{{ item.from_port }}" 
        to_port: "{{ item.to_port }}"
        policy_group: "{{ item.policy_group }}" 
        #fex_id: 151 <--------------------Ansible states this is an invalid parameter
        state: present
      delegate_to: localhost
      loop: "{{ MyPortProfile }}"

```

My\_Port\_Profile\_Kleaf221-FEX151-Copper-adds-test.yml:

```auto
MyPortProfile:
    - access_port_selector: eth151_1_2
      port_blk: 2
      leaf_port_blk_description: foo
      from_port: 2 
      to_port: 2
      policy_group: 10GigAuto_APG

```

Here’s the error I get:

```auto
failed: [bos-0k103-dc-apic1.mitre.org -> localhost] (item={'access_port_selector': 'eth151_1_2', 'port_blk': 2, 'leaf_port_blk_description': 'foo', 'from_port': 2, 'to_port': 2, 'policy_group': '10GigAuto_APG'}) => changed=false 
  ansible_loop_var: item
  error:
    code: '102'
    text: 'configured object ((Dn0)) not found Dn0=uni/infra/accportprof-Kleaf221_FEX151_IntProf/hports-eth151_1_2-typ-range, '
  item:
    access_port_selector: eth151_1_2
    from_port: 2
    leaf_port_blk_description: foo
    policy_group: 10GigAuto_APG
    port_blk: 2
    to_port: 2
  msg: 'APIC Error 102: configured object ((Dn0)) not found Dn0=uni/infra/accportprof-Kleaf221_FEX151_IntProf/hports-eth151_1_2-typ-range, '

```

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [September 20, 2023, 1:28pm UTC](https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939/2 "2023-09-20T13:28:08Z")

</div>

Ansible is not saying that 151 is an invalid parameter, it is passing the error back from your ACI controller

`APIC Error 102: configured object ((Dn0)) not found Dn0=uni/infra/accportprof-Kleaf221_FEX151_IntProf/hports-eth151_1_2-typ-range`

This error message is not an Ansible message, but just the error that it received from Cisco ACI.

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [September 20, 2023, 6:06pm UTC](https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939/3 "2023-09-20T18:06:53Z")

</div>

Hi @craymond422 , welcome to the community forum!

I just did a small edit to your message to add code blocks, this improves readability. You can select the text and use the \</\> button in the tool-bar of the message composer to do it in following topics, I hope @IPvSean 's message helps with the issue itself!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 20, 2023, 6:07pm UTC](https://forum.ansible.com/t/cisco-aci-aci-access-port-to-interface-policy-leaf-profile-doesnt-work-to-update-fex-ports/939/4 "2023-10-20T18:07:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
