network: Configure DNS servers
EL systems use DNS servers from interface configs so support it.
This commit is contained in:
parent
d2befe152b
commit
93c1ae2e89
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,12 @@ NETMASK="{{ item.netmask }}"
|
||||||
{% if item.gateway is defined %}
|
{% if item.gateway is defined %}
|
||||||
GATEWAY="{{ item.gateway }}"
|
GATEWAY="{{ item.gateway }}"
|
||||||
{% endif %}
|
{% 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' %}
|
{% elif proto == 'none' %}
|
||||||
BOOTPROTO=none
|
BOOTPROTO=none
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue