summaryrefslogtreecommitdiff
path: root/inventory/group_vars/vmhost-ele-helene/vars.yml
blob: 45f6ca623da763fafb1920c9debad3222df6b81e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
__vmhost_bridge_interface_zones__:
  eno2: "{{ network_zones | dict2items | rejectattr('value.vlan', 'undefined') | map(attribute='key') | difference(['lan']) }}"

__vmhost_bridge_interface_zones_yaml__: |
  {% for interface in (__vmhost_bridge_interface_zones__.keys() | sort) %}
  {%   for zone in __vmhost_bridge_interface_zones__[interface] %}
  {{ zone }}:
    interfaces:
    - {{ interface }}.{{ network_zones[zone].vlan }}
  {%   endfor %}
  {% endfor %}
  lan:
    interfaces:
    - eno1

vm_host:
  name: ele-helene
  network:
    bridges: "{{ __vmhost_bridge_interface_zones_yaml__ | from_yaml }}"