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

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:


- 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:

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:

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, '
1 Like

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.

2 Likes

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!

1 Like

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