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

Switchport trunk allowed vlans are gathered incorrectly #22

Open
jonipatr opened this issue Jan 11, 2021 · 1 comment · May be fixed by #30
Open

Switchport trunk allowed vlans are gathered incorrectly #22

jonipatr opened this issue Jan 11, 2021 · 1 comment · May be fixed by #30

Comments

@jonipatr
Copy link

SUMMARY

To me it seems that VLAN numbers are gathered to the "switchport trunk allowed vlans" by sorting them with first character.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

os6_vlan

ANSIBLE VERSION

ansible 2.10.3

CONFIGURATION

COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = [u'/usr/local/lib/python2.7/dist-packages/ansible_collections', u'/$HOME/.ansible/co
DEFAULT_GATHER_SUBSET(/etc/ansible/ansible.cfg) = [u'all']
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 10
DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = skippy
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 30

OS / ENVIRONMENT

Machine Description............... Dell EMC Networking Switch
System Model ID................... N2024
Version 6.6.0.15

STEPS TO REPRODUCE

playbook:
`---

  • name: Provision base settings for devices
    hosts: os6
    gather_facts: no
    connection: network_cli
    strategy: free
    vars:
    ansible_become: yes
    ansible_become_method: enable
    collections:
    • dellemc.os6
      os6_vlan:
      tagged_members_append: False
      tagged_members_state: present
      vlan 5:
      name: "Vlan5"
      tagged_members:
      - port: Po 1
      state: present
      - port: Gi1/0/20
      state: present
      state: present
      vlan 2509:
      name: "Vlan2509"
      tagged_members:
      - port: Po 1
      state: present
      untagged_members:
      - port: Gi1/0/1
      state: present
      - port: Gi1/0/2
      state: present
      - port: Gi1/0/3
      state: present
      state: present
      vlan 2514:
      name: "Vlan2514"
      tagged_members:
      - port: Po 1
      state: present
      untagged_members:
      - port: Gi1/0/4
      state: present
      - port: Gi1/0/5
      state: present
      state: present
      vlan 3404:
      name: "Vlan3404"
      tagged_members:
      - port: Po 1
      state: present
      - port: Gi1/0/20
      state: present
      state: present`
EXPECTED RESULTS

`interface Gi1/0/20
switchport trunk allowed vlan 5,3404

interface port-channel 1
switchport trunk allowed vlan 5,2509,2514,3404`

ACTUAL RESULTS

ask path: /usr/local/lib/python2.7/dist-packages/ansible_collections/dellemc/os6/roles/os6_vlan/tasks/main.yml:12 changed: [1213-scmga-dcs4g7-mit] => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3" }, "banners": [], "changed": true, "commands": [ "interface Po 1", "switchport trunk allowed vlan 2509,2514,3404-5", "exit", "interface Gi1/0/20", "switchport trunk allowed vlan 3404-5", "exit" ], "invocation": { "module_args": { "after": null, "backup": false, "backup_options": null, "before": null, "config": null, "lines": null, "match": "line", "parents": null, "provider": null, "replace": "line", "save": false, "src": "vlan 3404\nname \"Vlan3404\"\nexit\nvlan 2514\nname \"Vlan2514\"\nexit\ninterface Gi1/0/4\nswitchport access vlan 2514\nexit\ninterface Gi1/0/5\nswitchport access vlan 2514\nexit\nvlan 5\nname \"Vlan5\"\nexit\nvlan 2509\nname \"Vlan2509\"\nexit\ninterface Gi1/0/1\nswitchport access vlan 2509\nexit\ninterface Gi1/0/2\nswitchport access vlan 2509\nexit\ninterface Gi1/0/3\nswitchport access vlan 2509\nexit\ninterface Po 1\nswitchport trunk allowed vlan 2509,2514,3404-5\nexit\ninterface Gi1/0/20\nswitchport trunk allowed vlan 3404-5\nexit\n", "update": "merge" } }, "saved": false, "updates": [ "interface Po 1", "switchport trunk allowed vlan 2509,2514,3404-5", "exit", "interface Gi1/0/20", "switchport trunk allowed vlan 3404-5", "exit" ] } META: ran handlers META: ran handlers

VLAN5 is appended to the end of the vlans with '-' instead of appending to the beginning of the vlans.

@GuyFoetz GuyFoetz linked a pull request Apr 23, 2021 that will close this issue
@GuyFoetz
Copy link

Had this Problem too and added a pull request to fix this :)

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

Successfully merging a pull request may close this issue.

2 participants