blob: 206587dfca8c25ed6eb505a3ec0e312de4a4e305 [file] [log] [blame]
auto {{ item.name }}
{% if item.ip == "dhcp" %}
iface {{ item.name }} inet dhcp
{% if item.gw %}
up route add default gw {{ item.gw | ipaddr('address') }}
{% endif %}
{% elif item.ip == "manual" %}
iface {{ item.name }} inet manual
{% else %}
iface {{ item.name }} inet static
address {{ item.ip | ipaddr('address') }}
netmask {{ item.nw | ipaddr('netmask') }}
{% if item.gw %}
gateway {{ item.gw | ipaddr('address') }}
{% endif %}
{% if item.dns %}
dns-nameservers {{ item.dns }}
{% endif %}
{% endif %}