What do you try to make ?
------------------------------
PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...
PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)
PowerArubaCL: Powershell Module to use Aruba Central
PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..
ACEP / ACMX #107 / ACDX #1281
------------------------------
Original Message:
Sent: Jul 22, 2022 04:34 PM
From: Don Rhodes
Subject: AOSCX programmatically addressing lldp_neighbors
I have tried a few different way and receive the following:
"{{ (ansible_facts['net_interfaces']['line_card,1/1']['1/1/51']['lldp_neighbors'][*]) }}"
msg: 'template error while templating string: unexpected ''*''. String: {{ (ansible_facts[''net_interfaces''][''line_card,1/1''][''1/1/51''][''lldp_neighbors''][*]) }}'
"{{ (ansible_facts['net_interfaces']['line_card,1/1']['1/1/51']['lldp_neighbors']['*']) }}"
msg: |-
The task includes an option with an undefined variable. The error was: 'dict object' has no attribute '*'
Original Message:
Sent: Jul 05, 2022 08:57 AM
From: Alexis La Goutte
Subject: AOSCX programmatically addressing lldp_neighbors
Hi Don,
Do you have try to use * (wildcard) for port ?
------------------------------
PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...
PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)
PowerArubaCL: Powershell Module to use Aruba Central
PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..
ACEP / ACMX #107 / ACDX #1281
Original Message:
Sent: Jun 07, 2022 10:04 AM
From: Don Rhodes
Subject: AOSCX programmatically addressing lldp_neighbors
Hi all,
I likely could be going about this in all the wrong ways, but does anyone have a programmatic way to call out the lldp_neighbors in an AOSCX switch?
I have been able to do this:"{{ (ansible_facts['net_interfaces']['line_card,1/1']['1/1/25']['lldp_neighbors']) | first }}"
Which will output the neighbor's MAC,INT:
1a:2b:3c:4d:5e:6f,1/7/19
How can I address that fact to get to the underlying facts without baking that into my playbook?
------------------------------
Don Rhodes
------------------------------