Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nxos_vlans is unable to change an existing mapped_vni #907

Open
jospanier opened this issue Nov 25, 2024 · 0 comments
Open

nxos_vlans is unable to change an existing mapped_vni #907

jospanier opened this issue Nov 25, 2024 · 0 comments
Assignees
Labels
bug This issue/PR relates to a bug.

Comments

@jospanier
Copy link

SUMMARY

when the current device configuration already has a "vn-segment" config statement for a vlan, then the nxos_vlans module in unable to change this value.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

nxos_vlans

ANSIBLE VERSION
ansible [core 2.18.0]
  config file = /home/jspanier/ansible/netops/ansible.cfg
  configured module search path = ['/home/jspanier/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jspanier/venv/ansible/lib/python3.11/site-packages/ansible
  ansible collection location = /home/jspanier/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/jspanier/venv/ansible/bin/ansible
  python version = 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0] (/home/jspanier/venv/ansible/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection Version
---------- -------
cisco.nxos 9.2.1  
CONFIGURATION
ANSIBLE_PIPELINING(/home/jspanier/ansible/netops/ansible.cfg) = True
CONFIG_FILE() = /home/jspanier/ansible/netops/ansible.cfg
DEFAULT_FORKS(/home/jspanier/ansible/netops/ansible.cfg) = 36
DEFAULT_HOST_LIST(/home/jspanier/ansible/netops/ansible.cfg) = ['/home/jspanier/ansible/netops/inventory']
HOST_KEY_CHECKING(/home/jspanier/ansible/netops/ansible.cfg) = True

GALAXY_SERVERS:
OS / ENVIRONMENT

NXOS: version 9.3(3)
Cisco Nexus9000 C93180YC-FX

STEPS TO REPRODUCE

current config on device

vlan 308
  name demo_vlan
  vn-segment 10333

playbook:

- name:  Create VLANs on Fabric
  hosts: leafs
  gather_facts: no
  vars_files:
    - vars/vlans.yaml

  tasks:
    - name: create vlans
      cisco.nxos.nxos_vlans:
        config: "{{ vlans }}"
        state: overridden

vars/vlans.yaml

vlans:
 - { vlan_id: 308, name: "demo_vlan" , mapped_vni: 10308 }
EXPECTED RESULTS

new config on device:

vlan 308
  name demo_vlan
  vn-segment 10308
ACTUAL RESULTS

config unchanged

nxos_vlans module does not seem to issue a "no vn-segment" command when the mapped VNI needs to be changed.
NXOS CLI issues the error that vn-segment cannot be changed only AFTER one exits from VLAN config mode.

@roverflow roverflow added the bug This issue/PR relates to a bug. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants