diff --git a/salt/modules/debian_ip.py b/salt/modules/debian_ip.py index 2b09937416..4c601561d3 100644 --- a/salt/modules/debian_ip.py +++ b/salt/modules/debian_ip.py @@ -1261,7 +1261,7 @@ def build_interface(iface, iface_type, enabled, **settings): if iface_type in ['eth', 'bond', 'bridge', 'slave', 'vlan']: opts = _parse_settings_eth(settings, iface_type, enabled, iface) - if settings['test']: + if 'test' in settings and settings['test']: return _read_temp_ifaces(iface, opts[iface]) ifcfg = _write_file_ifaces(iface, opts[iface]) diff --git a/salt/templates/debian_ip/debian_eth.jinja b/salt/templates/debian_ip/debian_eth.jinja index f212106c0c..f5d2650ffc 100644 --- a/salt/templates/debian_ip/debian_eth.jinja +++ b/salt/templates/debian_ip/debian_eth.jinja @@ -12,8 +12,8 @@ iface {{name}} {{interface.inet_type}} {{interface.proto}} {%endif%}{% if interface.mtu %} mtu {{interface.mtu}} {%endif%}{% if interface.dns %} dns-nameservers {%for item in interface.dns %}{{item}} {%endfor%} {%endif%}{% if interface.ethtool %}{%for item in interface.ethtool_keys %} {{item}} {{interface.ethtool[item]}} -{%endfor%}{%endif%}{% if interface.bonding %}{%for item in interface.bonding_keys %} {{item}} {{interface.bonding[item]}} -{%endfor%}{%endif%}{% if interface.bridgeing %}{%for item in interface.bridgeing_keys %} {{item}} {{interface.bridgeing[item]}} +{%endfor%}{%endif%}{% if interface.bonding %}{%for item in interface.bonding_keys %} bond_{{item}} {{interface.bonding[item]}} +{%endfor%}{%endif%}{% if interface.bridgeing %}{%for item in interface.bridgeing_keys %} bridge_{{item}} {{interface.bridgeing[item]}} {%endfor%}{%endif%}{% if interface.up_cmds %}{% for cmd in interface.up_cmds %} up {{ cmd }} {%endfor-%} {%endif%}{% if interface.down_cmds %}{% for cmd in interface.down_cmds %} down {{ cmd }}