network: Add support to force DNS servers for interface
Previously DNS servers could be set for interface but they were used only when interface address was set to static. This change allow to set (or remove) DNS servers for interfaces regardles of IP address method.
This commit is contained in:
parent
25c4b3182a
commit
b776431baf
1 changed files with 6 additions and 6 deletions
|
@ -21,15 +21,15 @@ NETMASK="{{ item.netmask }}"
|
|||
{% if item.gateway is defined %}
|
||||
GATEWAY="{{ item.gateway }}"
|
||||
{% endif %}
|
||||
{% elif proto == 'none' %}
|
||||
BOOTPROTO=none
|
||||
{% endif %}
|
||||
{% if item.nameservers is defined %}
|
||||
PEERDNS=no
|
||||
{% for i in range(item.nameservers|length) %}
|
||||
DNS{{ i+1 }}={{ item.nameservers[i] }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% elif proto == 'none' %}
|
||||
BOOTPROTO=none
|
||||
{% endif %}
|
||||
{% if item.ip6addr is defined and item.ip6addr != 'none' %}
|
||||
IPV6INIT=yes
|
||||
{% if item.ip6addr != 'auto' %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue