From eebdf0b3606482f7a8b1b0c98b936c426820b44f Mon Sep 17 00:00:00 2001 From: timherrm Date: Sat, 15 Jul 2023 11:10:35 +0200 Subject: [PATCH] feat: move port and vlan definition to variables --- .../cisco-2960-1.n39.eu/port-assignments.yml | 310 ++++++++++++++++++ host_vars/cisco-2960-1.n39.eu/vlans.yml | 23 ++ 2 files changed, 333 insertions(+) create mode 100644 host_vars/cisco-2960-1.n39.eu/port-assignments.yml create mode 100644 host_vars/cisco-2960-1.n39.eu/vlans.yml diff --git a/host_vars/cisco-2960-1.n39.eu/port-assignments.yml b/host_vars/cisco-2960-1.n39.eu/port-assignments.yml new file mode 100644 index 0000000..aecc5ef --- /dev/null +++ b/host_vars/cisco-2960-1.n39.eu/port-assignments.yml @@ -0,0 +1,310 @@ +--- +ios_interfaces: + GigabitEthernet1/0/1: + description: MGMT + enabled: true + l2: + mode: access + access_vlan: 1 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/2: + description: MGMT + enabled: true + l2: + mode: access + access_vlan: 1 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/3: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/4: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/5: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/6: + description: USV + enabled: true + l2: + mode: access + access_vlan: 1 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/7: + description: beaker + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present + GigabitEthernet1/0/8: + description: beaker + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present + GigabitEthernet1/0/9: + description: beaker ipmi + enabled: true + l2: + mode: access + access_vlan: 1 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/10: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/11: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/12: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/13: + description: patchfeld 1 - Switch an Ausleihliste + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: 1,4,5,7,8,11 + trunk_native_vlan: 4 + state: present + lines: [] + state: present + GigabitEthernet1/0/14: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/15: + description: patchfeld 2 - Raspberry Pi Platon + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/16: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/17: + description: patchfeld 6 - Access Point Hempels Zimmer + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: 1,4,5,7,8,11 + trunk_native_vlan: 4 + state: present + lines: [] + state: present + GigabitEthernet1/0/18: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/19: + description: FräsPC + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/20: + description: patchfeld 4 - Switch am Basteltisch + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: 1,4,5,7,8,11 + trunk_native_vlan: 4 + state: present + lines: [] + state: present + GigabitEthernet1/0/21: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/22: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/23: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/24: + description: lan + enabled: true + l2: + mode: access + access_vlan: 4 + trunk_allowed_vlans: + trunk_native_vlan: + state: present + lines: [] + state: present + GigabitEthernet1/0/25: + description: uplink von descartes + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present + GigabitEthernet1/0/26: + description: marx + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present + GigabitEthernet1/0/27: + description: unconfigured + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present + GigabitEthernet1/0/28: + description: unconfigured + enabled: true + l2: + mode: trunk + access_vlan: + trunk_allowed_vlans: all + trunk_native_vlan: 1 + state: present + lines: [] + state: present \ No newline at end of file diff --git a/host_vars/cisco-2960-1.n39.eu/vlans.yml b/host_vars/cisco-2960-1.n39.eu/vlans.yml new file mode 100644 index 0000000..16ace16 --- /dev/null +++ b/host_vars/cisco-2960-1.n39.eu/vlans.yml @@ -0,0 +1,23 @@ +--- +ios_vlans: + 1: + name: MGMT + state: present + 4: + name: lan + state: present + 5: + name: wan + state: present + 7: + name: service + state: present + 8: + name: legacy + state: present + 9: + name: dmz + state: present + 11: + name: ffmd-client + state: present \ No newline at end of file