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

cisco.nxos.nxos_l2_interfaces module allowed_vlan: none doesn't work #910

Open
sunshinegorgon7 opened this issue Dec 5, 2024 · 0 comments
Assignees

Comments

@sunshinegorgon7
Copy link

SUMMARY

configuring allowed_vlan: none with state: replaced for an interface it doesn't apply none, and if none is already applied it removes it which actively makes the port allow all vlans.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.nxos.nxos_l2_interfaces

ANSIBLE VERSION

ansible [core 2.16.13]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ansible/.local/lib/python3.11/site-packages/ansible
ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
executable location = /home/ansible/.local/bin/ansible
python version = 3.11.10 (main, Sep 24 2024, 09:33:51) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.11)
jinja version = 3.1.3
libyaml = True

COLLECTION VERSION

Collection Version


cisco.nxos 9.2.1

CONFIGURATION

ACTION_WARNINGS(/etc/ansible/ansible.cfg) = False
CALLBACKS_ENABLED(/etc/ansible/ansible.cfg) = ['profile_tasks']
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 30
DEFAULT_LOCAL_TMP(/etc/ansible/ansible.cfg) = /tmp/.ansible/tmp/ansible-local-19008646w_amjtr
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DISPLAY_SKIPPED_HOSTS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent

OS / ENVIRONMENT

Red Hat Enterprise Linux release 8.10 (Ootpa)
Cisco Nexus 10.3.7

STEPS TO REPRODUCE
  • name: NXOS Interfaces
    hosts: reachable
    gather_facts: false
    vars:
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_os: cisco.nxos.nxos
    ansible_user: ansible
    ansible_ssh_private_key_file: "{{ KEY }}"
    tasks:
    cisco.nxos.nxos_l2_interfaces:
    config:
    - name: Ethernet1/1
    trunk:
    allowed_vlans: "none"
EXPECTED RESULTS

interface Ethernet1/1
switchport
switchport mode trunk
switchport trunk allowed vlan none

ACTUAL RESULTS

interface Ethernet1/1
switchport
switchport mode trunk

DEBUG

Before:
{
"mode": "trunk",
"name": "Ethernet1/1",
"trunk": {
"allowed_vlans": ""
}
},

After:

    {
        "mode": "trunk",
        "name": "Ethernet1/1"
    }

commands:
[
"interface Ethernet1/1",
"no switchport trunk allowed vlan"
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants