--- install_interface: enp2s0 install_dhcp: true install: disks: primary: /dev/disk/by-id/ata-Samsung_SSD_860_EVO_mSATA_250GB_S41MNC0KA13977X kernel_cmdline: - console=ttyS0,115200n8 network: domain: spreadspace.org __interfaces__: enp1s0: zones: lan: type: manual svc: type: manual enp2s0: zones: magenta: type: manual enp3s0: zones: mgmt: type: static address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address') }}" netmask: "{{ network_zones.mgmt.prefix | ipaddr('netmask') }}" iot: type: manual __interface_configs__: | {% for interface in __interfaces__.keys() %} ## ## /etc/network/interfaces.d/{{ interface }} ## auto {{ interface }} iface {{ interface }} inet manual {% for zone in __interfaces__[interface].zones.keys() %} auto {{ interface }}.{{ network_zones[zone].vlan }} iface {{ interface }}.{{ network_zones[zone].vlan }} inet manual auto br-{{ zone }} iface br-{{ zone }} inet {{ __interfaces__[interface].zones[zone].type }} bridge_ports {{ interface }}.{{ network_zones[zone].vlan }} bridge_stp off bridge_waitport 0 bridge_fd 0 {% if __interfaces__[interface].zones[zone].type == 'static' %} address {{ __interfaces__[interface].zones[zone].address }} netmask {{ __interfaces__[interface].zones[zone].netmask }} {% endif %} {% endfor %} {% endfor %}