From a7fffb3f8743a11cf8b0bb0c9357e9a7b7ef3724 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 23 Jun 2019 22:51:16 +0200 Subject: very basic swtich config --- .../group_vars/chaos_at_home_switches/main.yml | 12 +++++++++- inventory/group_vars/dellos6/main.yml | 26 ++-------------------- 2 files changed, 13 insertions(+), 25 deletions(-) (limited to 'inventory/group_vars') diff --git a/inventory/group_vars/chaos_at_home_switches/main.yml b/inventory/group_vars/chaos_at_home_switches/main.yml index df166186..fb72c9b1 100644 --- a/inventory/group_vars/chaos_at_home_switches/main.yml +++ b/inventory/group_vars/chaos_at_home_switches/main.yml @@ -2,4 +2,14 @@ switch_mgmt_zone: "{{ network_zones.mgmt }}" switch_mgmt_interface: "Gi1/0/28" -switch_network_zones: "{{ network_zones }}" +switch_vlans: "{{ switch_vlans_yaml | from_yaml }}" +switch_vlans_yaml: | + {% for zone_name in network_zones.keys() %} + - name: "{{ zone_name }}" + id: "{{ network_zones[zone_name].vlan }}" + {% endfor %} + +switch_interfaces: "{{ switch_interfaces_yaml | from_yaml }}" +switch_interfaces_yaml: | + - spec: range Gi1/0/1-27 + vlan: {{ network_zones['lan'].vlan }} diff --git a/inventory/group_vars/dellos6/main.yml b/inventory/group_vars/dellos6/main.yml index 0cb2bcda..29c4c0db 100644 --- a/inventory/group_vars/dellos6/main.yml +++ b/inventory/group_vars/dellos6/main.yml @@ -11,27 +11,5 @@ dellos6_mgmt_ipaddr: "{{ switch_mgmt_zone.prefix | ipaddr(switch_mgmt_zone.offse dellos6_mgmt_netmask: "{{ switch_mgmt_zone.prefix | ipaddr('netmask') }}" dellos6_mgmt_interface: "{{ switch_mgmt_interface | default('') }}" - -dellos6_vlans: "{{ dellos6_vlans_yaml | from_yaml }}" -dellos6_vlans_yaml: | - {% for zone_name in switch_network_zones.keys() %} - - name: "{{ zone_name }}" - id: "{{ switch_network_zones[zone_name].vlan }}" - {% endfor %} - -dellos6_interfaces: "{{ dellos6_interfaces_yaml | from_yaml }}" -dellos6_interfaces_yaml: | - - spec: range Gi1/0/5-27 - vlan: 28 - - spec: Te1/0/1 - description: "to sw1" - switchport_mode: trunk - # - spec: range Te1/0/3-4 - # channel_group: 1 - - spec: Po1 - description: "fileserver" - switchport_mode: general - allowed_vlans: - - 28 - - 32 - - 30 +dellos6_vlans: "{{ switch_vlans }}" +dellos6_interfaces: "{{ switch_interfaces }}" -- cgit v1.2.3