ansible-collections / cisco.nxos

Ansible Network Collection for Cisco NXOS
GNU General Public License v3.0
115 stars 109 forks source link

cisco.nxos.nxos_evpn_vni does not show proper state in check mode #883

Open heathdbrown opened 1 month ago

heathdbrown commented 1 month ago
SUMMARY

Running --check when using a playbook leveraging cixo.nxos.nxos_evpn_vni always shows not changed.

ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ansible [core 2.17.2]
  config file = None
  configured module search path = ['/home/omit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/omit/network_automation/ansible/.venv/lib/python3.11/site-packages/ansible
  ansible collection location = /home/omit/.ansible/collections:/usr/share/ansible/collections
  executable location = .venv/bin/ansible
  python version = 3.11.3 (main, Aug 13 2023, 22:42:49) [GCC 11.3.0] (/home/omit/network_automation/ansible/.venv/bin/python)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection Version
---------- -------
cisco.nxos 9.1.0
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

NXOS 9.3.12

STEPS TO REPRODUCE
ansible-playbook playbook.yaml -i inventory/hosts --check

---
- hosts: all
  connection: network_cli
  gather_facts: false

  tasks:
    - name: Add EVPN VNI
      cisco.nxos.nxos_evpn_vni:
          route_distinguisher: auto
          route_target_import: auto
          route_target_export: auto
          vni: 123456
EXPECTED RESULTS

When in --check mode when a change needs to be made and the return value has commands the result should show 'changed'.

changed: [switch] => "changed: true, "comands": ["evpn", "vni 123456" l2", "rd auto", "route-target import auto", "route-target export auto"]
ACTUAL RESULTS
ok: [switch] => "changed: true, "comands": ["evpn", "vni 123456" l2", "rd auto", "route-target import auto", "route-target export auto"]