Removing redundant line

After looking at this a bit more closely, I believe "interface.address" was meant to be "interface.addrfam" which /does/ make sense on this line.

Because of the previous notion that all interfaces will have an address, it seems a second line was created that assumed the only scenario where an iface won't have an address is when dhcp is used. Again, not an accurate assumption. I believe this /should/ handle most expected situations.
This commit is contained in:
Michael Lustfield 2016-12-02 12:06:59 -06:00 committed by GitHub
parent 3a8168667b
commit 41ffb8d805

View file

@ -2,8 +2,7 @@
{%endif%}{% if data.hotplug %}allow-hotplug {{name}}
{%endif%}{%- if data.data['inet'] -%}
{%- set interface = data.data['inet'] -%}
{% if interface.proto %}iface {{name}} {{interface.addrfam}} {{interface.proto}}
{%endif%}{% if interface.proto == 'dhcp' %}iface {{name}} {{interface.addrfam}} {{interface.proto}}
{% if interface.proto and interface.addrfam %}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}}
{%endif%}{% if interface.address %} address {{interface.address}}