Files
ansible-role-common/templates/resolv.conf.j2
2017-09-05 12:59:29 +02:00

15 lines
482 B
Django/Jinja

# {{ ansible_managed }}
{% if common_resolvconf_domain -%}
domain {{ common_resolvconf_domain }}
{% endif %}
{% if ansible_local is defined and ansible_local.hardwarenode.hnfqdn and common_resolvconf_hnfqdn -%}
nameserver {{ lookup('dig', ansible_local.hardwarenode.hnfqdn ) }}
{% endif %}
{% for nameserver in common_resolvconf_nameservers -%}
nameserver {{ nameserver }}
{% endfor %}
{% if common_resolvconf_search -%}
search {{ common_resolvconf_search|join(' ') }}
{% endif %}