From 3e8c0e35d40d5a47a7e84e75979e17820dee8f76 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 26 Oct 2020 17:10:27 +0100 Subject: don't use main.yml inside group_vars --- inventory/group_vars/chaos-at-home-switches/vars.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 inventory/group_vars/chaos-at-home-switches/vars.yml (limited to 'inventory/group_vars/chaos-at-home-switches/vars.yml') diff --git a/inventory/group_vars/chaos-at-home-switches/vars.yml b/inventory/group_vars/chaos-at-home-switches/vars.yml new file mode 100644 index 00000000..fb72c9b1 --- /dev/null +++ b/inventory/group_vars/chaos-at-home-switches/vars.yml @@ -0,0 +1,15 @@ +--- +switch_mgmt_zone: "{{ network_zones.mgmt }}" +switch_mgmt_interface: "Gi1/0/28" + +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 }} -- cgit v1.2.3