Corrects regression in debian_ip/debian_eth.jinja

Not all interfaces will have an address. Bug #38042
This commit is contained in:
Michael Lustfield 2016-12-01 21:43:50 -06:00 committed by GitHub
parent 9661258f22
commit 4de2cb2805

View file

@ -2,7 +2,7 @@
{%endif%}{% if data.hotplug %}allow-hotplug {{name}}
{%endif%}{%- if data.data['inet'] -%}
{%- set interface = data.data['inet'] -%}
{% if interface.proto and interface.address %}iface {{name}} {{interface.addrfam}} {{interface.proto}}
{% if interface.proto %}iface {{name}} {{interface.addrfam}} {{interface.proto}}
{%endif%}{% if interface.proto == 'dhcp' %}iface {{name}} {{interface.addrfam}} {{interface.proto}}
{%endif %}{% if interface.hwaddress %} hwaddress {{interface.hwaddress}}
{%endif%}{% if interface.vlan_raw_device %} vlan-raw-device {{interface.vlan_raw_device}}