1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_resolvconf.git synced 2024-08-16 10:09:52 +02:00
ansible_role_resolvconf/templates/resolv.conf.j2
2021-03-08 11:31:34 +01:00

22 lines
753 B
Django/Jinja

# {{ ansible_managed }}
# do1jlr.resolvconf
{% if resolvconf__search is defined and resolvconf__search | length > 0 -%}
search {{ resolvconf__search|join(' ') }}
{% endif %}
{% if resolvconf__domain is defined and resolvconf__domain != "" -%}
domain {{ resolvconf__domain }}
{% endif %}
{% if resolvconf__nameservers is defined and resolvconf__nameservers != "" %}
{% for n in resolvconf__nameservers -%}
nameserver {{ n }}
{% endfor %}
{% endif %}
{% if resolvconf__sortlist is defined and resolvconf__sortlist | length > 0 %}
{% for s in resolvconf__sortlist -%}
sortlist {{ sl }}
{% endfor %}
{% endif %}
{% if resolvconf__options is defined and resolvconf__options | length > 0 -%}
options {{ resolvconf__options|join(' ') }}
{% endif %}