links: %{ for i, net in node.networks ~} - name: eth${i} up: true %{ if net.vlan_id > 0 ~} - name: eth${i}.${net.vlan_id} logical: true up: true kind: vlan type: ether parentName: eth${i} vlan: vlanID: ${net.vlan_id} vlanProtocol: 802.1q %{ endif ~} %{ endfor ~} addresses: - address: ${node.networks[0].ip}/${split("/", node.networks[0].cidr)[1]} linkName: %{ if node.networks[0].vlan_id > 0 }eth0.${node.networks[0].vlan_id}%{ else }eth0%{ endif } family: inet4 scope: global flags: permanent layer: platform routes: - family: inet4 gateway: ${node.networks[0].gateway} outLinkName: %{ if node.networks[0].vlan_id > 0 }eth0.${node.networks[0].vlan_id}%{ else }eth0%{ endif } table: main priority: 1024 scope: global type: unicast protocol: static layer: platform resolvers: - dnsServers: %{ for dns in dns_servers ~} - ${dns} %{ endfor ~} layer: platform