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 fails when unrelated interface is mode private-vlan promiscuous or private-vlan host #631

Open
JHilsberg opened this issue Feb 23, 2023 · 2 comments
Assignees
Labels
feature This issue/PR relates to a feature request. l2_interfaces l2_interfaces resource module

Comments

@JHilsberg
Copy link

SUMMARY

Playbook using l2_interfaces module reporting an error when interfaces with switchport mode private-vlan promiscuous or private-vlan host are configured

failed: [host1] (item=Ethernet1/20) => {"ansible_loop_var": "item", "changed": false, "item": "Ethernet1/20", "msg": "value of mode must be one of: access, dot1q-tunnel, trunk, fex-fabric, fabricpath, got: private-vlan promiscuous found in config"}

Problem is the same as in issues: #600 and #166
Only allowed types are "access", "dot1q-tunnel", "trunk", "fex-fabric", "fabricpath"

file: cisco.nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py
line: "choices": ["access", "dot1q-tunnel", "trunk", "fex-fabric", "fabricpath"],

The port to configure self is in mode trunk, just other ports on the switch are configured in private-vlan mode:

interface Ethernet1/20
  description Eth1/20 test
  shutdown
  switchport mode trunk
  switchport trunk allowed vlan 1549,1556

interface port-channel40
  description Backup interface
  switchport mode private-vlan promiscuous
  switchport private-vlan mapping 63 740,750,760,820

ISSUE TYPE
  • Bug Report
COMPONENT NAME

l2_interfaces

ANSIBLE VERSION
  config file = /home/dci18869/temp_ansible_host/ansible.cfg
  configured module search path = ['/home/automation/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Apr 30 2019, 13:27:23) [GCC]

COLLECTION VERSION
CONFIGURATION

OS / ENVIRONMENT

cisco Nexus5548
7.3(12)N1(1)

STEPS TO REPRODUCE
  nos_config:
    lines:
      - "switchport trunk allowed vlan add {{ nw_interface_vlan_id }}"
    parents:
      - "interface {{ item }}"
  with_items: "{{ nw_interfaces }}"

EXPECTED RESULTS

add vlan to allowed vlans of the interface

ACTUAL RESULTS
@NilashishC NilashishC self-assigned this Mar 1, 2023
@NilashishC NilashishC added l2_interfaces l2_interfaces resource module feature This issue/PR relates to a feature request. labels Mar 1, 2023
@NilashishC
Copy link
Collaborator

@praveenramoorthy @mikewiebe The virtual N9Ks do not seem to support this. Could you please provide some guidance? Thank you.

@praveenramoorthy
Copy link
Contributor

@NilashishC you need to enable "feature private-plan" for private vlan mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request. l2_interfaces l2_interfaces resource module
Projects
None yet
Development

No branches or pull requests

3 participants