cisco.nxos icon indicating copy to clipboard operation
cisco.nxos copied to clipboard

cisco.nxos.nxos_l2_interfaces fails when unrelated interface is mode private-vlan promiscuous or private-vlan host

Open JHilsberg opened this issue 2 years ago • 2 comments

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

JHilsberg avatar Feb 23 '23 15:02 JHilsberg

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

NilashishC avatar Apr 03 '23 07:04 NilashishC

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

praveenramoorthy avatar Apr 04 '23 13:04 praveenramoorthy