ansible/roles/nsd/templates/nsd.conf.j2

35 lines
687 B
Plaintext
Raw Permalink Normal View History

2020-01-01 17:17:43 +00:00
# {{ ansible_managed }}
{% if nsd_server_config is defined and
nsd_server_config is mapping %}
server:
{% for k, v in nsd_server_config.items() %}
{% if v is string or v is number %}
{{ k }}: {{ v }}
{% elif v is sequence %}
{% for vv in v %}
{{ k }}: {{ vv }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if nsd_zones is defined and
nsd_zones is sequence %}
{% for zone in nsd_zones %}
{% if zone is defined and
zone is mapping %}
zone:
{% for k, v in zone.items() %}
{% if v is string %}
{{ k }}: {{ v }}
{% elif v is sequence %}
{% for vv in v %}
{{ k }}: {{ vv }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}