05-03-2021 10:03 PM
Under Fabric-Inventory-Pod x- Leafxxx-Interfaces-Physical Interfaces-Eth1/1 you can add a Description to that port. Login to the leaf and do a show interface status shows the description.
Is there a way to set this description with ansible or terraform? I have not found a module for this, and I have tried using the rest api. But with no luck.
Has anyone done this?
I would like to be able to set the description with information extracted from dcTrack. Our DC guys does the cabling in our DC's and update dcTrack. We can extract this information with api and want to use it for descripton as mentioned above.
Solved! Go to Solution.
05-03-2021 11:45 PM
this seemed to solve the problem:
- name: ACI REST
hosts: localhost
connection: local
gather_facts: no
vars:
validate_certs: no
tasks:
- name: Using REST API with a JSON string
aci_rest:
hostname: 10.166.254.10
username: '{{ username }}'
password: '{{ password }}'
validate_certs: '{{ validate_certs }}'
method: post
path: /api/node/mo/uni/infra/hpaths-201_eth1_1.json
content: |
{
"infraHPathS": {
"attributes": {
"descr":"apic1"
}
}
}
05-03-2021 11:45 PM
this seemed to solve the problem:
- name: ACI REST
hosts: localhost
connection: local
gather_facts: no
vars:
validate_certs: no
tasks:
- name: Using REST API with a JSON string
aci_rest:
hostname: 10.166.254.10
username: '{{ username }}'
password: '{{ password }}'
validate_certs: '{{ validate_certs }}'
method: post
path: /api/node/mo/uni/infra/hpaths-201_eth1_1.json
content: |
{
"infraHPathS": {
"attributes": {
"descr":"apic1"
}
}
}
06-17-2024 08:24 AM
Hi,
you can also use the cisco.aci.aci_access_port_block_to_access_port module, if you wish. I think it looks a bit nicer in the playbook.
Regards.
Oz
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide