Add search domains

This commit is contained in:
Ryan Cavicchioni 2019-03-27 07:33:30 +00:00
parent 8c241920ea
commit 87697ec353
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 14 additions and 0 deletions

View File

@ -6,3 +6,10 @@ nameserver {{ ns }}
{% if network_resolv_conf_options is defined %} {% if network_resolv_conf_options is defined %}
options {{ network_resolv_conf_options | join(' ') }} options {{ network_resolv_conf_options | join(' ') }}
{% endif %} {% endif %}
{% if network_search is defined %}
{% if network_search is iterable and network_search is not string %}
search {{ network_search | join(' ') }}
{% else %}
search {{ network_search }}
{% endif %}
{% endif %}

View File

@ -4,3 +4,10 @@
{% for ns in (network_nameservers | shuffle(seed=inventory_hostname)) %} {% for ns in (network_nameservers | shuffle(seed=inventory_hostname)) %}
DNS={{ ns }} DNS={{ ns }}
{% endfor %} {% endfor %}
{% if network_search is defined %}
{% if network_search is iterable and network_search is not string %}
Domains={{ network_search | join(' ') }}
{% else %}
Domains={{ network_search }}
{% endif %}
{% endif %}