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 configuration ignored if defined in multiple yml #23

Open
cathode911 opened this issue Dec 10, 2018 · 0 comments
Open

switchport configuration ignored if defined in multiple yml #23

cathode911 opened this issue Dec 10, 2018 · 0 comments

Comments

@cathode911
Copy link

cathode911 commented Dec 10, 2018

In cases of using switchport configuration in different yml files, e.g

group_vars/leafs.yml

# Global leaf-only applied configuration
---
# Switchports configuration
switchports:
  - name: Ethernet1
    mode: trunk
    trunk_allowed_vlans:
      - 1300
      - 4009
      - 4010
      - 4011
  - name: Ethernet5
    mode: trunk
    trunk_allowed_vlans:
      - 1300
      - 4009
      - 4010
      - 4011
  - name: Ethernet7
    mode: trunk
    trunk_allowed_vlans:
      - 171
      - 4020
      - 4021

host_vars/10.2.200.68.yml

# Switchports configuration
switchports:
  - name: Ethernet2
    mode: access
    access_vlan: 4010
  - name: Ethernet6
    mode: access
    access_vlan: 4010
  - name: Ethernet10
    mode: access
    access_vlan: 4010

configuration in group_vars is completely ignored - only configuration from host_vars is applied

TASK [arista.eos-bridging : Arista EOS switchport resources (Ansible >= 2.2)] **
ok: [10.2.200.68] => (item={u'access_vlan': 4010, u'name': u'Ethernet2', u'mode': u'access'})
ok: [10.2.200.69] => (item={u'access_vlan': 4011, u'name': u'Ethernet2', u'mode': u'access'})
ok: [10.2.200.68] => (item={u'access_vlan': 4010, u'name': u'Ethernet6', u'mode': u'access'})
ok: [10.2.200.69] => (item={u'access_vlan': 4011, u'name': u'Ethernet6', u'mode': u'access'})
ok: [10.2.200.69] => (item={u'access_vlan': 4011, u'name': u'Ethernet10', u'mode': u'access'})
ok: [10.2.200.68] => (item={u'access_vlan': 4010, u'name': u'Ethernet10', u'mode': u'access'})

It would be reasonable if port configuration in host config files would supersede global config thus allowing agile control over exclusions in port configuration.

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

1 participant