mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge branch '2014.7' of https://github.com/saltstack/salt into develop
This commit is contained in:
commit
fec7703ef3
@ -626,9 +626,10 @@ def _parse_interfaces(interface_files=None):
|
||||
# ensure a consistent order
|
||||
for iface_name in adapters:
|
||||
for opt in ['ethtool', 'bonding', 'bridging']:
|
||||
if opt in adapters[iface_name]['data']['inet']:
|
||||
opt_keys = sorted(adapters[iface_name]['data']['inet'][opt].keys())
|
||||
adapters[iface_name]['data']['inet'][opt + '_keys'] = opt_keys
|
||||
if 'inet' in adapters[iface_name]['data']:
|
||||
if opt in adapters[iface_name]['data']['inet']:
|
||||
opt_keys = sorted(adapters[iface_name]['data']['inet'][opt].keys())
|
||||
adapters[iface_name]['data']['inet'][opt + '_keys'] = opt_keys
|
||||
|
||||
return adapters
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% if data.enabled %}auto {{name}}
|
||||
{%endif%}{% if data.hotplug %}allow-hotplug {{name}}
|
||||
{%endif%}{% if data.data['inet'] %}
|
||||
{%endif%}{%- if data.data['inet'] -%}
|
||||
{%- set interface = data.data['inet'] -%}
|
||||
iface {{name}} {{interface.addrfam}} {{interface.proto}}
|
||||
{%endif%}{% if interface.hwaddress %} hwaddress {{interface.hwaddress}}
|
||||
{% if interface.proto %}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}}
|
||||
{%endif%}{% if interface.netmask %} netmask {{interface.netmask}}
|
||||
@ -59,7 +59,8 @@ iface {{name}} {{interface.addrfam}} {{interface.proto}}
|
||||
{%endfor-%}
|
||||
{%endif%}{% if interface.post_down_cmds %}{% for cmd in interface.post_down_cmds %} post-down {{ cmd }}
|
||||
{%endfor-%}{%endif%}
|
||||
{% if data.data['inet6'] %}
|
||||
{%endif%}
|
||||
{%- if data.data['inet6'] -%}
|
||||
{%- set interface = data.data['inet6'] -%}
|
||||
iface {{name}} {{interface.addrfam}} {{interface.proto}}
|
||||
{% if interface.hwaddress %} hwaddress {{interface.hwaddress}}
|
||||
|
Loading…
Reference in New Issue
Block a user