Open jcremp77 opened 2 months ago
Seems it was introduced with https://github.com/ansible-collections/cisco.nxos/commit/5b461af7f4e7d5fc38365db15055370c32e3a2b6
It appears to be in context to 'sub-interface encapsulation' which is not part of the scenario here.
@jcremp77 whats the ansible.netcommon
version you are using here?
Can you please check this with using the latest ansible.netcommon version and if it solves this issue?
@Ruchip16 'ansible.netcommon 6.1.3'; the site shows this to be latest, and is the version I have been testing with.
https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/index.html
I see the same issue with ansible.netcommon 7.1.0 and cisco.nxos 9.2.1
I can reproduce the same issue with nxos versions 8.1.0 and newer.
Problem doesn't present when running 8.0.0 (ansible-galaxy collection install cisco.nxos==8.0.0)
Other versions used: 'ansible.netcommon:6.1.0' 'ansible.utils:4.0.0'
I can reproduce the same issue with nxos versions 8.1.0 and newer.
Problem doesn't present when running 8.0.0
(ansible-galaxy collection install cisco.nxos==8.0.0)
Other versions used: 'ansible.netcommon:6.1.0' 'ansible.utils:4.0.0'
ansible.netcommon==7.2.1 has the same issue here
SUMMARY
Ansible is returning an error when using NXAPI with module name 'cisco.nxos.nxos_l3_interfaces'
There do not seem to be any issues with:
Was able to use these Ansible modules via the NXAPI with no issues.
ISSUE TYPE
Cannot configure Cisco Nexus switchport using module: cisco.nxos.nxos_l3_interfaces, via httpapi.
Snippet of error returned:
COMPONENT NAME
Ansible Module: cisco.nxos.nxos_l3_interfaces
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible control node: Ubuntu Desktop 22.04
Linux tools-auto-01 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Ansible Target Node: Cisco Nexus 9000v
nxos.9.3.9.bin
STEPS TO REPRODUCE
Deploy 1 x Cisco nexus 9000v with the aforementioned image file.
Deploy 1 x Ansible Control Node with Python3, Ansible, Ansible-Galaxy (with NXOS), install roles 'spine' and 'leaf'.
Connect both the Target (nxos) and Control nodes to some management network.
Configure 'interface mgmt 0' on Cisco Nexus virtual switch.
Configure Control Node with IP address on same network as the Cisco Nexus virtual switch.
Configure '/group_vars/all' file on the Ansible Control Node:
On the Control Node create 'hosts' file in the root of the 'playbook' folder:
On the Control Node create '/roles/spine/tasks/main.yml'
On the Control Node create '/host_vars/sp01.yml'
EXPECTED RESULTS
no errors
ACTUAL RESULTS
Using Module with variables
Using Module with provided values; note: (truncated for brevity)