Open rfreddy opened 5 months ago
Please disregard, I'm getting different kinds of results from exceptions, empty interfaces and missing fields according to different devices and OS versions. I need to run more tests before opening another issue.
Thanks
Hi @rfreddy, will check and update on this.
Hi @prasadapr, so far I'm getting some data from the facts to ingest into Netbox but there are some fields that are coming empty (interface mediatype) and other has a strange contents (ansible_net_neighbors) list the interfaces in a wrong way.
'ansible_net_interfaces': {'ethernet1/1/1': {'description': '', 'duplex': 'auto', 'primary_ipv4': '', 'secondary_ipv4': '', 'ipv6': [], 'mtu': '1532', 'speed': 'AUTO', 'type': 'ianaift:ethernetCsmacd', 'bandwidth': '1000000000', 'adminstatus': 'up', 'operstatus': 'down', 'macaddress':'8c:47:be:63:21:01', 'mediatype': ''}
Please let me know if I can provide more information. Have a great day 'ansible_net_neighbors': {'ethernet1/1/52': [{'host': 'roc-nc-sw2', 'port': 'VGVuR2lnYWJpdEV0aGVybmV0IDAvMTQ='}]}
Hi @prasadapr, I fixed the problems that I was having, I did a couple of modifications in the os10_facts.py module to point to the right info:
media-type ---> media-type-str rem-lldp-port-id ---> rem-port-desc
Now I'm getting the right info, I must say I did this on version 1.2.3 because 1.2.4 I got errors executing the playbook.
Thanks
Hello @prasadapr, do you have any idea of why os10_facts module doesn't list port-channels? My python is quite elementary and I can't figure out how to modify the module in order to add them into the output. Can you help me with this issue please? Thanks!
Hi @rfreddy, sorry little bit busy with other tasks, that's why not able to look in to this. Pls find my observations:
From above data, i can see 2 things:
Hi @rfreddy, I have verified and able to get interfaces data using os10_facts module. And able to get the port-channel details using os10_facts module, when configured port-channel details. Config is not available, we won't get it.
root@ubuntu22-vm-38-27:~/OS10-Collections# cat Issue-166_getfacts_interfaces.yaml
---
- name: Collect the interface data using get facts
hosts: datacenter
gather_facts: true
connection: network_cli
collections:
- dellemc.os10
tasks:
- name: Collects interface data
os10_facts:
gather_subset:
- interfaces
root@ubuntu22-vm-38-27:~/OS10-Collections#
Find the execution log for the same:
root@ubuntu22-vm-38-27:~/OS10-Collections# ansible-playbook -i inventory.yaml Issue-166_getfacts_interfaces.yaml -vvv
ansible-playbook [core 2.14.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /root/OS10-Collections/inventory.yaml as it did not pass its verify_file() method
script declined parsing /root/OS10-Collections/inventory.yaml as it did not pass its verify_file() method
Parsed /root/OS10-Collections/inventory.yaml inventory source with ini plugin
redirecting (type: action) dellemc.os10.os10_facts to dellemc.os10.os10
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: Issue-166_getfacts_interfaces.yaml ****************************************************************************************************************
1 plays in Issue-166_getfacts_interfaces.yaml
PLAY [Collect the interface data using get facts] ***********************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************
task path: /root/OS10-Collections/Issue-166_getfacts_interfaces.yaml:2
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<100.104.94.11> ESTABLISH LOCAL CONNECTION FOR USER: root
<100.104.94.11> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-2067671m9uom4dh `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762 `" && echo ansible-tmp-1714051556.808685-2067675-273685705937762="` echo /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762 `" ) && sleep 0'
Using module file /usr/local/lib/python3.10/dist-packages/ansible/modules/setup.py
<100.104.94.11> PUT /root/.ansible/tmp/ansible-local-2067671m9uom4dh/tmptyncpvy1 TO /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762/AnsiballZ_setup.py
<100.104.94.11> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762/ /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762/AnsiballZ_setup.py && sleep 0'
<100.104.94.11> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762/AnsiballZ_setup.py && sleep 0'
<100.104.94.11> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-2067671m9uom4dh/ansible-tmp-1714051556.808685-2067675-273685705937762/ > /dev/null 2>&1 && sleep 0'
ok: [Issue_166]
redirecting (type: action) dellemc.os10.os10_facts to dellemc.os10.os10
TASK [Collects interface data] ******************************************************************************************************************************
task path: /root/OS10-Collections/Issue-166_getfacts_interfaces.yaml:10
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: action) dellemc.os10.os10_facts to dellemc.os10.os10
redirecting (type: action) dellemc.os10.os10_facts to dellemc.os10.os10
ok: [Issue_166] => {
"ansible_facts": {
"ansible_net_all_ipv4_addresses": [
"2.2.2.2/24",
"100.104.94.11/24",
"172.16.128.0/32",
"172.30.0.0/32"
],
"ansible_net_all_ipv6_addresses": [
"fde2:53ba:e9a0:cccc:684f:64ff:fe01:e07d/64",
"fde1:53ba:e9a0:cccc:0:5eff:fe00:1100/64"
],
"ansible_net_gather_subset": [
"interfaces",
"default"
],
"ansible_net_hostname": "OS10-8985",
"ansible_net_interfaces": {
"ethernet1/1/1": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:ed",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/10": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f6",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/11": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f7",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/12": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f8",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/13": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f9",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/14": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:fa",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/15": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:fb",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/16": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:fc",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/17": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:fd",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/18": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:fe",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/19": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:ff",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/2": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:ee",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/20": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:00",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/21": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:01",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/22": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:02",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/23": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:03",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/24": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:04",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/25": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:05",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/26": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:09",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/29": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:15",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/3": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:ef",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/30": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:19",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/31": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:1d",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/32": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:1e",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/33": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:1f",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/34": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:20",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/35": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:21",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/36": {
"adminstatus": "up",
"bandwidth": "1000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:22",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/37": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:23",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/38": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:24",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/39": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:25",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/4": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f0",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/40": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:26",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/41": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:27",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/42": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:28",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/43": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:29",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/44": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2a",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/45": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2b",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/46": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2c",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/47": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2d",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/48": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2e",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/49": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:2f",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/5": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f1",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/50": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:30",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/51": {
"adminstatus": "up",
"bandwidth": "1000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:31",
"mediatype": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "2.2.2.2/24",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/52": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:32",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/53": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:33",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/54": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:34",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/6": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f2",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/7": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f3",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/8": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f4",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"ethernet1/1/9": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:f5",
"mediatype": "",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "ianaift:ethernetCsmacd"
},
"loopback1": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "",
"ipv6": [],
"macaddress": null,
"mtu": "",
"operstatus": "up",
"primary_ipv4": "172.16.128.0/32",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:softwareLoopback"
},
"loopback2": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "",
"ipv6": [],
"macaddress": null,
"mtu": "",
"operstatus": "up",
"primary_ipv4": "172.30.0.0/32",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:softwareLoopback"
},
"mgmt1/1/1": {
"adminstatus": "up",
"bandwidth": "1000000000",
"description": "",
"duplex": "auto",
"ipv6": [],
"macaddress": "68:4f:64:01:df:ec",
"mtu": "1532",
"operstatus": "up",
"primary_ipv4": "100.104.94.11/24",
"secondary_ipv4": "",
"speed": "AUTO",
"type": "base-if:management"
},
"null0": {
"adminstatus": "up",
"bandwidth": "",
"description": "",
"duplex": "",
"ipv6": [],
"macaddress": "",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "base-if:null"
},
"port-channel1": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel2",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:35",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel10": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3e",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel11": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3f",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel12": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:40",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel13": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:41",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel14": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:42",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel15": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:43",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel16": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:44",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel17": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:45",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel18": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:46",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel19": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:47",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel2": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel2",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:36",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel20": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:48",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel3": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:37",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel4": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:38",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel5": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:39",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel6": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3a",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel7": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3b",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel8": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3c",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"port-channel9": {
"adminstatus": "up",
"bandwidth": "0",
"description": "port-channel3-20",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:3d",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:ieee8023adLag"
},
"virtual-network3939": {
"adminstatus": "up",
"bandwidth": "0",
"description": "virtual-network3939",
"duplex": "",
"ipv6": [
"fde1:53ba:e9a0:cccc:0:5eff:fe00:1100/64"
],
"macaddress": "68:4f:64:01:e0:7e",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "base-if:virtualNetwork"
},
"vlan4000": {
"adminstatus": "up",
"bandwidth": "0",
"description": "",
"duplex": "",
"ipv6": [
"fde2:53ba:e9a0:cccc:684f:64ff:fe01:e07d/64"
],
"macaddress": "68:4f:64:01:e0:7d",
"mtu": "",
"operstatus": "down",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:l2vlan"
},
"vlan4089": {
"adminstatus": "up",
"bandwidth": "10000000000",
"description": "",
"duplex": "",
"ipv6": [],
"macaddress": "68:4f:64:01:e0:7d",
"mtu": "",
"operstatus": "up",
"primary_ipv4": "",
"secondary_ipv4": "",
"speed": "",
"type": "ianaift:l2vlan"
}
},
"ansible_net_model": "S4148F-ON",
"ansible_net_name": "Enterprise",
"ansible_net_neighbors": {
"ethernet1/1/1": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMQ=="
}
],
"ethernet1/1/11": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMTE="
}
],
"ethernet1/1/12": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMTI="
}
],
"ethernet1/1/2": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMg=="
}
],
"ethernet1/1/31": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMzE="
}
],
"ethernet1/1/32": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMzI="
}
],
"ethernet1/1/33": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMzM="
}
],
"ethernet1/1/34": [
{
"host": "OS10-8986",
"port": "ZXRoZXJuZXQxLzEvMzQ="
}
],
"mgmt1/1/1": [
{
"host": "swlab3-maa-tor-J3",
"port": "ZXRoZXJuZXQxLzEvOA=="
}
]
},
"ansible_net_servicetag": "F9QQXC2",
"ansible_net_version": "10.5.6.0DEV"
},
"changed": false,
"invocation": {
"module_args": {
"gather_subset": [
"interfaces"
],
"provider": null
}
}
}
PLAY RECAP **************************************************************************************************************************************************
Issue_166 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
root@ubuntu22-vm-38-27:~/OS10-Collections#
SUMMARY
When getting facts from OS10 devices some fields come empty, specifically inside ansible_net_interfaces
ISSUE TYPE
COMPONENT NAME
.ansible/collections/ansible_collections/dellemc/os10/plugins/modules/os10_facts.py
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Host: Ubuntu 22.04
Switch: Dell N3048-ON OS 10 Version 10.5.3.4
STEPS TO REPRODUCE
ansible-playbook -i inventory.yaml get_fact_os10.yaml
EXPECTED RESULTS
For OS9 facts the data returned for the interfaces looks like this
'ansible_net_interfaces': {'GigabitEthernet 1/1': {' description': None, 'macaddress': '8c:47:be:64:8a:82', 'ipv4': None, 'mtu': 1554, 'bandwidth': 1000, 'mediatype': None, 'duplex': 'full', 'lineprotocol': 'up', 'operstatus': 'up', 'type': 'DellEth'}
ACTUAL RESULTS