mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
fixing bond and bridge config templating in debian_ip module
This commit is contained in:
parent
da6f73fbb2
commit
05bebb5f3c
@ -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])
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user