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

Unable to Merge a vlan to a Trunk Port #1090

Open
Kniickk opened this issue Jun 19, 2024 · 0 comments
Open

Unable to Merge a vlan to a Trunk Port #1090

Kniickk opened this issue Jun 19, 2024 · 0 comments
Assignees
Labels
bug This issue/PR relates to a bug.

Comments

@Kniickk
Copy link

Kniickk commented Jun 19, 2024

SUMMARY
ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_l2_interfaces

ANSIBLE VERSION
ansible [core 2.15.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /bin/ansible
  python version = 3.11.5 (main, Oct 25 2023, 16:19:59) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True

COLLECTION VERSION

# /root/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.ios  9.0.0

# /usr/lib/python3.11/site-packages/ansible_collections
Collection Version
---------- -------
cisco.ios  4.6.1

CONFIGURATION
CONFIG_FILE() = /etc/ansible/ansible.cfg
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 60

OS / ENVIRONMENT

OS: Rocky Linux 8
Device: Cisco 3850
IOS Version: 16.12.11

STEPS TO REPRODUCE

I created a Port-channel on the Switch, the Port-Channel should be a trunk Port with a VLAN 10.
After that i want to add the VLAN 15 on the same Trunk Port, but the config will be overridden, not merged.

---
- name: adding_new_vlan
  hosts: Distribution_Switche
  vars_files:
    - /etc/ansible/vault/VAULT_FILE.yaml

  tasks:
  - name: Adding VLAN to Switch
    cisco.ios.ios_vlans:
      config:
        - name: VLAN0015
          vlan_id: 15
          state: active

  - name: Adding VLAN to Port-Channel ABM
    cisco.ios.ios_l2_interfaces:
      config:
       - name: Port-Channel30
         mode: trunk
         trunk: 
           allowed_vlans: 10
      state: merged
EXPECTED RESULTS

I was expecting that the playbook adds the VLAN to the already created via the "switchport trunk allowed vlan add" command.

ACTUAL RESULTS

But the VLAN config is always replaced with the VLANs i write in the "allowed_vlans:" part.


@roverflow roverflow self-assigned this Jun 26, 2024
@rohitthakur2590 rohitthakur2590 added the bug This issue/PR relates to a bug. label Jul 17, 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