You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running cisco.nxos.nxos_vlans to create new vlan and then run the playbook again it always returns result as "changed" where it should return "OK" instead.
Targeted device information:
Software
BIOS: version 01.08
NXOS: version 10.1(1)
BIOS compile time: 05/06/2022
NXOS image file is: bootflash:///nxos.10.1.1.bin
NXOS compile time: 2/14/2021 15:00:00 [02/15/2021 01:41:40]
Hardware
cisco Nexus9000 C93180YC-FX3 Chassis
Intel(R) Xeon(R) CPU D-1526 @ 1.80GHz with 16332572 kB of memory.
Processor Board ID FDO28021CCG
Device name: lab-n9k-0
bootflash: 115805708 kB
STEPS TO REPRODUCE
Create new vlan with playbook and run playbook twice
- name: Testing playbook for nexushosts: n9k_labgather_facts: falsetasks:
- name: Create new vlan and add vn-segmentcisco.nxos.nxos_vlans:
config:
- vlan_id: 50mapped_vni: 5050
EXPECTED RESULTS
After running playbook second time and vlan already exists I expect result to be OK
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
n9k_lab : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
ACTUAL RESULTS
When running playbook again when vlan is already in place, always getting changed. See below.
It seems that after and before are different the module automatically adds "mode":"ce" to after list
PLAY [Testing playbook for nexus] *************************************************************************************************************************************************************************************************************
TASK [Create new vlan and add vn-segment] ***************************************************************************************************************************************************************************************************
task path: /home/user/folder1/nxos_testing.yaml:11
Loading collection ansible.netcommon from /home/user/.ansible/collections/ansible_collections/ansible/netcommon
Loading collection ansible.netcommon from /home/user/.ansible/collections/ansible_collections/ansible/netcommon
Loading collection ansible.utils from /home/user/.ansible/collections/ansible_collections/ansible/utils
Loading collection ansible.utils from /home/user/.ansible/collections/ansible_collections/ansible/utils
<10.255.255.240> Using network group action cisco.nxos.nxos for cisco.nxos.nxos_vlans
<10.255.255.241> Using network group action cisco.nxos.nxos for cisco.nxos.nxos_vlans
<10.255.255.240> attempting to start connection
<10.255.255.240> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/user/.local/bin/ansible-connection
<10.255.255.241> attempting to start connection
<10.255.255.241> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/user/.local/bin/ansible-connection
<10.255.255.240> local domain socket does not exist, starting it
<10.255.255.240> control socket path is /home/user/.ansible/pc/95ea4b5be0
<10.255.255.240> Loading collection ansible.builtin from
<10.255.255.240> Loading collection ansible.netcommon from /home/user/.ansible/collections/ansible_collections/ansible/netcommon
<10.255.255.240> Loading collection ansible.utils from /home/user/.ansible/collections/ansible_collections/ansible/utils
<10.255.255.240> Loading collection cisco.nxos from /home/user/.ansible/collections/ansible_collections/cisco/nxos
<10.255.255.240> local domain socket listeners started successfully
<10.255.255.240> loaded cliconf plugin ansible_collections.cisco.nxos.plugins.cliconf.nxos from path /home/user/.ansible/collections/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py for network_os cisco.nxos.nxos
<10.255.255.240> ssh type is set to paramiko
<10.255.255.240> Loading collection ansible.builtin from
<10.255.255.240> local domain socket path is /home/user/.ansible/pc/95ea4b5be0
<10.255.255.240> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<10.255.255.241> local domain socket does not exist, starting it
<10.255.255.241> control socket path is /home/user/.ansible/pc/d8a14fcd4c
<10.255.255.241> Loading collection ansible.builtin from
<10.255.255.241> Loading collection ansible.netcommon from /home/user/.ansible/collections/ansible_collections/ansible/netcommon
<10.255.255.241> Loading collection ansible.utils from /home/user/.ansible/collections/ansible_collections/ansible/utils
<10.255.255.241> Loading collection cisco.nxos from /home/user/.ansible/collections/ansible_collections/cisco/nxos
<10.255.255.241> local domain socket listeners started successfully
<10.255.255.241> loaded cliconf plugin ansible_collections.cisco.nxos.plugins.cliconf.nxos from path /home/user/.ansible/collections/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py for network_os cisco.nxos.nxos
<10.255.255.241> ssh type is set to paramiko
<10.255.255.241> Loading collection ansible.builtin from
<10.255.255.241> local domain socket path is /home/user/.ansible/pc/d8a14fcd4c
<10.255.255.241> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<10.255.255.240> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.nxos.nxos_vlans at /home/user/.ansible/collections/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py
<10.255.255.240> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.nxos.nxos_vlans
<10.255.255.241> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.nxos.nxos_vlans at /home/user/.ansible/collections/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py
<10.255.255.241> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.nxos.nxos_vlans
<10.255.255.240> ANSIBLE_NETWORK_IMPORT_MODULES: complete
<10.255.255.241> ANSIBLE_NETWORK_IMPORT_MODULES: complete
changed: [n9k_lab] => {
"after": [
{
"enabled": true,
"mode": "ce",
"name": "default",
"state": "active",
"vlan_id": 1
},
{
"enabled": true,
"mode": "ce",
"state": "active",
"vlan_id": 5
},
{
"enabled": true,
"mode": "ce",
"state": "active",
"vlan_id": 50
}
],
"before": [
{
"enabled": true,
"name": "default",
"state": "active",
"vlan_id": 1
},
{
"enabled": true,
"state": "active",
"vlan_id": 5
},
{
"enabled": true,
"state": "active",
"vlan_id": 50
}
],
"changed": true,
"commands": [
"vlan 50",
"vn-segment 5050"
],
"invocation": {
"module_args": {
"config": [
{
"enabled": null,
"mapped_vni": 5050,
"name": null,
"state": null,
"vlan_id": 50
}
],
"running_config": null,
"state": "merged"
}
}
}
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
n9k_lab : ok=0 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Is this bug? I think it should show OK if no new vlan was added.
The text was updated successfully, but these errors were encountered:
I couldn't find any information on it elsewhere.
SUMMARY
When running cisco.nxos.nxos_vlans to create new vlan and then run the playbook again it always returns result as "changed" where it should return "OK" instead.
ISSUE TYPE
COMPONENT NAME
cisco.nxos.nxos_vlans
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Targeted device information:
Software
BIOS: version 01.08
NXOS: version 10.1(1)
BIOS compile time: 05/06/2022
NXOS image file is: bootflash:///nxos.10.1.1.bin
NXOS compile time: 2/14/2021 15:00:00 [02/15/2021 01:41:40]
Hardware
cisco Nexus9000 C93180YC-FX3 Chassis
Intel(R) Xeon(R) CPU D-1526 @ 1.80GHz with 16332572 kB of memory.
Processor Board ID FDO28021CCG
Device name: lab-n9k-0
bootflash: 115805708 kB
STEPS TO REPRODUCE
Create new vlan with playbook and run playbook twice
EXPECTED RESULTS
After running playbook second time and vlan already exists I expect result to be OK
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
n9k_lab : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
ACTUAL RESULTS
When running playbook again when vlan is already in place, always getting changed. See below.
It seems that after and before are different the module automatically adds "mode":"ce" to after list
Is this bug? I think it should show OK if no new vlan was added.
The text was updated successfully, but these errors were encountered: