update..
This commit is contained in:
@ -61,24 +61,6 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
|
||||
{% endfor -%}
|
||||
{% endif %}
|
||||
|
||||
{# #}
|
||||
{# nameservers #}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
# dns-* options are implemented by the resolvconf package, if installed
|
||||
# sets entries in /etc/resolv.conf
|
||||
#
|
||||
{% endif -%}
|
||||
{% if config.search is defined and config.search %}
|
||||
dns-search {{ config.search }}
|
||||
{% endif -%}
|
||||
{%- if (config.nameservers is defined) and config.nameservers %}
|
||||
{% for _ip in config.nameservers %}
|
||||
dns-nameserver {{ _ip }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
|
||||
{% endif -%}
|
||||
{# #}
|
||||
{# subnets #}
|
||||
{%- if (config.subnets is defined) and (0 < config.subnets | length) %}
|
||||
@ -98,25 +80,46 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
|
||||
{% endfor %}
|
||||
|
||||
{% endif -%}
|
||||
|
||||
{# #}
|
||||
{# bond parameters #}
|
||||
{% set bond_keys = ['master', 'primary', 'slaves', 'mode', 'miimon', 'lacp-rate', 'ad-select', 'downdelay', 'updelay'] %}
|
||||
{%- if (config.bond is defined) and (bond_keys | intersect(config.bond.keys())) -%}
|
||||
{%- if (config.bond is defined) and (bond_keys | intersect(config.bond.keys())) %}
|
||||
# bond parameters
|
||||
{% for key in bond_keys %}
|
||||
{% if key in config.bond -%}
|
||||
{% if key in config.bond %}
|
||||
bond-{{ key }} {{ config.bond[key] }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{# #}
|
||||
{% endif -%}
|
||||
|
||||
{# #}
|
||||
{# nameservers #}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
# dns-* options are implemented by the resolvconf package, if installed
|
||||
# sets entries in /etc/resolv.conf
|
||||
#
|
||||
{% endif -%}
|
||||
{% if config.search is defined and config.search %}
|
||||
dns-search {{ config.search }}
|
||||
{% endif -%}
|
||||
{%- if (config.nameservers is defined) and config.nameservers %}
|
||||
{% for _ip in config.nameservers %}
|
||||
dns-nameservers {{ _ip }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
|
||||
{% endif -%}
|
||||
|
||||
{# #}
|
||||
{# vlan #}
|
||||
{% set vlan_keys = ['raw-device'] %}
|
||||
{%- if (config.vlan is defined) and (vlan_keys | intersect(config.vlan.keys())) -%}
|
||||
# vlan
|
||||
{% for key in vlan_keys %}
|
||||
{% if key in config.vlan -%}
|
||||
{% if key in config.vlan %}
|
||||
vlan-{{ key }} {{ config.vlan[key] }}
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user