ansible/roles/network/templates/resolv.conf.j2

16 lines
456 B
Plaintext
Raw Normal View History

2019-03-27 07:05:37 +00:00
# {{ ansible_managed }}
{% for ns in (network_nameservers | shuffle(seed=inventory_hostname))[:3] %}
nameserver {{ ns }}
{% endfor %}
{% if network_resolv_conf_options is defined %}
options {{ network_resolv_conf_options | join(' ') }}
{% endif %}
2019-03-27 07:33:30 +00:00
{% 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 %}