From 73d46b706e32a1079e6e6b3969562d6972ee4f14 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 25 May 2024 20:26:43 +0200 Subject: ch-sw0,ch-sw1 -> ch-sw2,ch-sw3 --- chaos-at-home/ch-sw0.yml | 8 --- chaos-at-home/ch-sw1.yml | 8 --- chaos-at-home/ch-sw2.yml | 8 +++ chaos-at-home/ch-sw3.yml | 8 +++ inventory/group_vars/chaos-at-home/network.yml | 2 + inventory/host_vars/ch-sw0.yml | 68 -------------------------- inventory/host_vars/ch-sw1.yml | 46 ----------------- inventory/host_vars/ch-sw2.yml | 68 ++++++++++++++++++++++++++ inventory/host_vars/ch-sw3.yml | 46 +++++++++++++++++ inventory/hosts.ini | 4 +- 10 files changed, 134 insertions(+), 132 deletions(-) delete mode 100644 chaos-at-home/ch-sw0.yml delete mode 100644 chaos-at-home/ch-sw1.yml create mode 100644 chaos-at-home/ch-sw2.yml create mode 100644 chaos-at-home/ch-sw3.yml delete mode 100644 inventory/host_vars/ch-sw0.yml delete mode 100644 inventory/host_vars/ch-sw1.yml create mode 100644 inventory/host_vars/ch-sw2.yml create mode 100644 inventory/host_vars/ch-sw3.yml diff --git a/chaos-at-home/ch-sw0.yml b/chaos-at-home/ch-sw0.yml deleted file mode 100644 index c3d02802..00000000 --- a/chaos-at-home/ch-sw0.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: bootstrap - hosts: ch-sw0 - gather_facts: no - roles: - - role: dellos6/bootstrap - - role: dellos6/base - - role: dellos6/layer2 diff --git a/chaos-at-home/ch-sw1.yml b/chaos-at-home/ch-sw1.yml deleted file mode 100644 index ed7b0be5..00000000 --- a/chaos-at-home/ch-sw1.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: bootstrap - hosts: ch-sw1 - gather_facts: no - roles: - - role: dellos6/bootstrap - - role: dellos6/base - - role: dellos6/layer2 diff --git a/chaos-at-home/ch-sw2.yml b/chaos-at-home/ch-sw2.yml new file mode 100644 index 00000000..124c2026 --- /dev/null +++ b/chaos-at-home/ch-sw2.yml @@ -0,0 +1,8 @@ +--- +- name: bootstrap + hosts: ch-sw2 + gather_facts: no + roles: + - role: dellos6/bootstrap + - role: dellos6/base + - role: dellos6/layer2 diff --git a/chaos-at-home/ch-sw3.yml b/chaos-at-home/ch-sw3.yml new file mode 100644 index 00000000..bb98d389 --- /dev/null +++ b/chaos-at-home/ch-sw3.yml @@ -0,0 +1,8 @@ +--- +- name: bootstrap + hosts: ch-sw3 + gather_facts: no + roles: + - role: dellos6/bootstrap + - role: dellos6/base + - role: dellos6/layer2 diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml index 8984a5a2..d4a5d2cd 100644 --- a/inventory/group_vars/chaos-at-home/network.yml +++ b/inventory/group_vars/chaos-at-home/network.yml @@ -118,6 +118,8 @@ network_zones: ch-telesto: 102 # IPMI ch-sw0: 200 ch-sw1: 201 + ch-sw2: 202 + ch-sw3: 203 ch-ups-test0: 210 ch-ups-test1: 211 ch-ap0: 220 diff --git a/inventory/host_vars/ch-sw0.yml b/inventory/host_vars/ch-sw0.yml deleted file mode 100644 index f2f6d3df..00000000 --- a/inventory/host_vars/ch-sw0.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -switch_interfaces_yaml: | - - spec: Te1/0/1 - description: "sw1" - switchport_mode: trunk - - - spec: Te1/0/2 - description: "RFU" - switchport_mode: trunk - - - spec: Te1/0/3 - description: "FRU" - vlan: {{ network_zones.lan.vlan }} - - - spec: Te1/0/4 - description: "equinox-ws" - vlan: {{ network_zones.lan.vlan }} - - spec: Gi1/0/6 - description: "equinox-ws" - vlan: {{ network_zones.mgmt.vlan }} - - - spec: Gi1/0/5 - vlan: {{ network_zones.lan.vlan }} - - spec: range Gi1/0/7-16 - vlan: {{ network_zones.lan.vlan }} - - - spec: range Gi1/0/17-18 - description: "ap" - switchport_mode: general - tagged_only: true - allowed_vlans_tagged: - - {{ network_zones.mgmt.vlan }} - - {{ network_zones.lan.vlan }} - - {{ network_zones.iot.vlan }} - - - spec: Gi1/0/19 - description: "phoebe-eno2" - vlan: {{ network_zones.svc.vlan }} - - spec: Gi1/0/20 - description: "phoebe-eno1" - vlan: {{ network_zones.lan.vlan }} - - spec: Gi1/0/21 - description: "phoebe-eno4" - switchport_mode: general - tagged_only: true - allowed_vlans_tagged: - - {{ network_zones.magenta.vlan }} - - spec: Gi1/0/22 - description: "phoebe-eno3" - switchport_mode: general - tagged_only: true - allowed_vlans_tagged: - - {{ network_zones.iot.vlan }} - - {{ network_zones.mgmt.vlan }} - - {{ network_zones.c3voc.vlan }} - - - spec: Gi1/0/23 - vlan: {{ network_zones.svc.vlan }} - - - spec: Gi1/0/24 - description: "magenta-modem" - vlan: {{ network_zones.magenta.vlan }} - - - spec: range Gi1/0/25-26 - vlan: {{ network_zones.iot.vlan }} - - - spec: range Gi1/0/27-28 - vlan: {{ network_zones.mgmt.vlan }} diff --git a/inventory/host_vars/ch-sw1.yml b/inventory/host_vars/ch-sw1.yml deleted file mode 100644 index cf77edbf..00000000 --- a/inventory/host_vars/ch-sw1.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -switch_interfaces_yaml: | - - spec: Te1/0/1 - description: "sw0" - switchport_mode: trunk - - - spec: Te1/0/2 - description: "RFU" - switchport_mode: trunk - - - spec: Te1/0/3 - description: "epimetheus" - vlan: {{ network_zones.lan.vlan }} - - - spec: Te1/0/4 - description: "prometheus" - vlan: {{ network_zones.lan.vlan }} - - - spec: range Gi1/0/5-6 - channel_group: 1 - - spec: port-channel 1 - description: "prometheus" - switchport_mode: general - tagged_only: yes - allowed_vlans_tagged: {{ network_zones | list | difference(['lan']) | map('extract', network_zones) | selectattr('vlan', 'defined') | map(attribute='vlan') | list }} - - - spec: range Gi1/0/7-14 - vlan: {{ network_zones.lan.vlan }} - - - spec: range Gi1/0/15-16 - description: "ap" - switchport_mode: general - tagged_only: true - allowed_vlans_tagged: - - {{ network_zones.mgmt.vlan }} - - {{ network_zones.lan.vlan }} - - {{ network_zones.iot.vlan }} - - - spec: range Gi1/0/17-22 - vlan: {{ network_zones.iot.vlan }} - - - spec: range Gi1/0/23-26 - vlan: {{ network_zones.svc.vlan }} - - - spec: range Gi1/0/27-28 - vlan: {{ network_zones.mgmt.vlan }} diff --git a/inventory/host_vars/ch-sw2.yml b/inventory/host_vars/ch-sw2.yml new file mode 100644 index 00000000..f2f6d3df --- /dev/null +++ b/inventory/host_vars/ch-sw2.yml @@ -0,0 +1,68 @@ +--- +switch_interfaces_yaml: | + - spec: Te1/0/1 + description: "sw1" + switchport_mode: trunk + + - spec: Te1/0/2 + description: "RFU" + switchport_mode: trunk + + - spec: Te1/0/3 + description: "FRU" + vlan: {{ network_zones.lan.vlan }} + + - spec: Te1/0/4 + description: "equinox-ws" + vlan: {{ network_zones.lan.vlan }} + - spec: Gi1/0/6 + description: "equinox-ws" + vlan: {{ network_zones.mgmt.vlan }} + + - spec: Gi1/0/5 + vlan: {{ network_zones.lan.vlan }} + - spec: range Gi1/0/7-16 + vlan: {{ network_zones.lan.vlan }} + + - spec: range Gi1/0/17-18 + description: "ap" + switchport_mode: general + tagged_only: true + allowed_vlans_tagged: + - {{ network_zones.mgmt.vlan }} + - {{ network_zones.lan.vlan }} + - {{ network_zones.iot.vlan }} + + - spec: Gi1/0/19 + description: "phoebe-eno2" + vlan: {{ network_zones.svc.vlan }} + - spec: Gi1/0/20 + description: "phoebe-eno1" + vlan: {{ network_zones.lan.vlan }} + - spec: Gi1/0/21 + description: "phoebe-eno4" + switchport_mode: general + tagged_only: true + allowed_vlans_tagged: + - {{ network_zones.magenta.vlan }} + - spec: Gi1/0/22 + description: "phoebe-eno3" + switchport_mode: general + tagged_only: true + allowed_vlans_tagged: + - {{ network_zones.iot.vlan }} + - {{ network_zones.mgmt.vlan }} + - {{ network_zones.c3voc.vlan }} + + - spec: Gi1/0/23 + vlan: {{ network_zones.svc.vlan }} + + - spec: Gi1/0/24 + description: "magenta-modem" + vlan: {{ network_zones.magenta.vlan }} + + - spec: range Gi1/0/25-26 + vlan: {{ network_zones.iot.vlan }} + + - spec: range Gi1/0/27-28 + vlan: {{ network_zones.mgmt.vlan }} diff --git a/inventory/host_vars/ch-sw3.yml b/inventory/host_vars/ch-sw3.yml new file mode 100644 index 00000000..cf77edbf --- /dev/null +++ b/inventory/host_vars/ch-sw3.yml @@ -0,0 +1,46 @@ +--- +switch_interfaces_yaml: | + - spec: Te1/0/1 + description: "sw0" + switchport_mode: trunk + + - spec: Te1/0/2 + description: "RFU" + switchport_mode: trunk + + - spec: Te1/0/3 + description: "epimetheus" + vlan: {{ network_zones.lan.vlan }} + + - spec: Te1/0/4 + description: "prometheus" + vlan: {{ network_zones.lan.vlan }} + + - spec: range Gi1/0/5-6 + channel_group: 1 + - spec: port-channel 1 + description: "prometheus" + switchport_mode: general + tagged_only: yes + allowed_vlans_tagged: {{ network_zones | list | difference(['lan']) | map('extract', network_zones) | selectattr('vlan', 'defined') | map(attribute='vlan') | list }} + + - spec: range Gi1/0/7-14 + vlan: {{ network_zones.lan.vlan }} + + - spec: range Gi1/0/15-16 + description: "ap" + switchport_mode: general + tagged_only: true + allowed_vlans_tagged: + - {{ network_zones.mgmt.vlan }} + - {{ network_zones.lan.vlan }} + - {{ network_zones.iot.vlan }} + + - spec: range Gi1/0/17-22 + vlan: {{ network_zones.iot.vlan }} + + - spec: range Gi1/0/23-26 + vlan: {{ network_zones.svc.vlan }} + + - spec: range Gi1/0/27-28 + vlan: {{ network_zones.mgmt.vlan }} diff --git a/inventory/hosts.ini b/inventory/hosts.ini index b6cbaa4e..0f68afd1 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -91,8 +91,8 @@ mz-ap ansible_host=chmz-ap [chaos-at-home-switches:vars] ansible_port=22 [chaos-at-home-switches] -ch-sw0 host_name=sw0 ansible_host=192.168.42.200 -ch-sw1 host_name=sw1 ansible_host=192.168.42.201 +ch-sw2 host_name=sw2 ansible_host=192.168.42.202 +ch-sw3 host_name=sw3 ansible_host=192.168.42.203 [chaos-at-home-ap] ch-ap0 host_name=ap0 -- cgit v1.2.3