ansible-aci icon indicating copy to clipboard operation
ansible-aci copied to clipboard

BGP type L3out always reports a change

Open edudppaz opened this issue 3 months ago • 1 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

When configuring a L3out cisco.aci.aci_l3out of type BGP, the subsequent runs always show a change on the l3out even though nothing is being changed. It seems like this is due to the eigrpExtP, ospfExtP and pimExtP always being marked as "deleted" on the Ansible invocation side.

Affected Module Name(s):

  • cisco.aci.aci_l3out

APIC version and APIC Platform

  • V 5.2(8e) and on-prem.

Collection versions

  • cisco.aci 2.8.0

Output/ Error message

changed: [localhost] => (item=CML-l3out-to-external-router-1) => {
    "ansible_loop_var": "item",
    "changed": true,
    "current": [
        {
            "l3extOut": {
                "attributes": {
                    "annotation": "orchestrator:ansible",
                    "descr": "",
                    "dn": "uni/tn-CML/out-l3out-to-external-router-1",
                    "enforceRtctrl": "export",
                    "mplsEnabled": "no",
                    "name": "l3out-to-external-router-1",
                    "nameAlias": "",
                    "ownerKey": "",
                    "ownerTag": "",
                    "targetDscp": "unspecified",
                    "userdom": ":all:"
                },
                "children": [
                    {
                        "l3extRsL3DomAtt": {
                            "attributes": {
                                "annotation": "",
                                "tDn": "uni/l3dom-ROUTED1",
                                "userdom": ":all:"
                            }
                        }
                    },
                    {
                        "l3extRsEctx": {
                            "attributes": {
                                "annotation": "",
                                "tnFvCtxName": "prod.prod-vrf",
                                "userdom": "all"
                            }
                        }
                    },
                    {
                        "bgpExtP": {
                            "attributes": {
                                "annotation": "",
                                "descr": "",
                                "nameAlias": "",
                                "userdom": ":all:"
                            }
                        }
                    }
                ]
            }
        }
    ],
    "invocation": {
        "module_args": {
            "annotation": "orchestrator:ansible",
            "asn": null,
            "certificate_name": "ACIAdmin",
            "description": "",
            "domain": "ROUTED1",
            "dscp": null,
            "host": "10.1.241.36",
            "l3out": "l3out-to-external-router-1",
            "l3protocol": [
                "bgp"
            ],
            "mpls": null,
            "name": "l3out-to-external-router-1",
            "name_alias": null,
            "ospf": null,
            "output_level": "normal",
            "output_path": null,
            "owner_key": null,
            "owner_tag": null,
            "password": null,
            "port": null,
            "private_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "protocol": "https",
            "route_control": [
                "export"
            ],
            "state": "present",
            "tenant": "CML",
            "timeout": null,
            "use_proxy": null,
            "use_ssl": null,
            "username": "admin",
            "validate_certs": false,
            "vrf": "prod.prod-vrf"
        }
    },
    "item": {
        "tenant_l3outs_domain": "ROUTED1",
        "tenant_l3outs_name": "l3out-to-external-router-1",
        "tenant_l3outs_protocol": "bgp",
        "tenant_l3outs_vrf": "prod.prod-vrf",
        "tenant_name": "CML"
    },
    "mo": {
        "l3extOut": {
            "attributes": {
                "annotation": "orchestrator:ansible",
                "descr": "",
                "dn": "uni/tn-CML/out-l3out-to-external-router-1",
                "enforceRtctrl": "export",
                "name": "l3out-to-external-router-1"
            },
            "children": [
                {
                    "l3extRsL3DomAtt": {
                        "attributes": {
                            "tDn": "uni/l3dom-ROUTED1"
                        }
                    }
                },
                {
                    "l3extRsEctx": {
                        "attributes": {
                            "tnFvCtxName": "prod.prod-vrf"
                        }
                    }
                },
                {
                    "bgpExtP": {
                        "attributes": {
                            "descr": ""
                        }
                    }
                },
                {
                    "eigrpExtP": {
                        "attributes": {
                            "status": "deleted"
                        }
                    }
                },
                {
                    "ospfExtP": {
                        "attributes": {
                            "status": "deleted"
                        }
                    }
                },
                {
                    "pimExtP": {
                        "attributes": {
                            "status": "deleted"
                        }
                    }
                }
            ]
        }
    }
}

Expected Behavior

No change is reported for the l3out

Actual Behavior

Change is always reported for l3out

Playbook tasks to Reproduce

Run playbook with (example):

    - name: Add L3 Outs to tenant
      cisco.aci.aci_l3out:
        <<: *aci_info
        tenant: "{{ item.tenant_name }}"
        name: "{{ item.tenant_l3outs_name }}"
        description: "{{ item.tenant_l3outs_description|default('') }}"
        domain: "{{ item.tenant_l3outs_domain }}"
        vrf: "{{ item.tenant_l3outs_vrf }}"
        l3protocol: ["{{ item.tenant_l3outs_protocol }}"]
        route_control: "export"
        state: present
      loop: "{{ aci_tenants|aci_listify('tenant', 'l3outs') }}"
      loop_control:
        label: "{{ item.tenant_name }}-{{ item.tenant_l3outs_name }}"

Data:

---
  aci_tenants:
    tenant:
      - name: CML
        l3outs:
          - name: l3out-to-external-router-1
            vrf: prod.prod-vrf
            domain: ROUTED1
            protocol: bgp

Important Factoids

References

  • #0000

edudppaz avatar Mar 12 '24 11:03 edudppaz