Hi,
In the past when I have used ansible_network_resources.l2_interfaces it provided me with a dictionary. But now I am getting a class type list variable instead of a dictionary (which is odd). Therefore I am missing all those values like item.access, item.trunk etc.
I know I am missing something here. Your help is much appreciated.
Below is the simple playbook I am using for a proof of concept.
---
- name: Gather Hardware Data
cisco.ios.ios_facts:
gather_subset: hardware
- name: Gather all Layer 2 Interfaces
cisco.ios.ios_facts:
gather_subset: min
gather_network_resources: l2_interfaces
- name: Print one variable
ansible.builtin.debug:
var: item
loop: "{{ ansible_network_resources.l2_interfaces | dict2items }}"