{% if no_networks is undefined %}
network --bootproto=dhcp{% if system is defined and system.fqdn %} --hostname={{ system.fqdn }}{% endif %}

{% if dhcp_networks %}
{% for device in dhcp_networks|split(';') %}
network --bootproto=dhcp --device={{ device }}
{% endfor %}
{% endif %}
{% if static_networks %}
{% for network in static_networks|split(';') %}
{% set device, cidr = network|split(',') %}
{% set ip = netaddr.IPNetwork(cidr) %}
network --bootproto=static --device={{ device }} --ip={{ ip.ip }} --netmask={{ ip.netmask }}
{% endfor %}
{% endif %}
{% endif %}