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 %}
|
||||
GATEWAY="{{ item.gateway }}"
|
||||
{% 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 %}
|
||||
|
|
Loading…
Add table
Reference in a new issue