2016-03-27 18:16:46 +02:00
|
|
|
{# If value is a list, expand it by printing several (key, value) pairs. #}
|
|
|
|
{# Otherwise, just print the (key, value) pair unchanged. #}
|
|
|
|
{% macro expand_list(key, value) -%}
|
2016-03-26 17:54:31 +01:00
|
|
|
{% if value is string or value is number %}
|
|
|
|
{{ key }}: "{{ value }}"
|
|
|
|
{% else %}
|
|
|
|
{% for subvalue in value %}
|
|
|
|
{{ key }}: "{{ subvalue }}"
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2016-03-27 18:16:46 +02:00
|
|
|
{%- endmacro %}
|
|
|
|
# NSD configuration, automatically generated by Ansible.
|
|
|
|
# Do not edit by hand!
|
|
|
|
|
|
|
|
server:
|
2017-09-01 15:24:13 +02:00
|
|
|
{% if nsd_server_config is defined %}
|
2016-03-27 18:16:46 +02:00
|
|
|
# Common configuration
|
2018-05-25 15:57:33 +02:00
|
|
|
{% for key, value in nsd_server_config.items() -%}
|
2016-03-27 18:16:46 +02:00
|
|
|
{{ expand_list(key, value) }}
|
|
|
|
{%- endfor %}
|
2016-03-27 18:06:15 +02:00
|
|
|
{% endif %}
|
2016-03-26 17:54:31 +01:00
|
|
|
|
2021-01-04 22:34:08 +01:00
|
|
|
{% if nsd_remote_control is defined %}
|
|
|
|
remote-control:
|
|
|
|
{% for key, value in nsd_remote_control.items() -%}
|
|
|
|
{{ expand_list(key, value) }}
|
|
|
|
{%- endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
2017-09-01 15:24:13 +02:00
|
|
|
{% if nsd_local_server_config is defined %}
|
2016-03-26 17:54:31 +01:00
|
|
|
# Local configuration
|
2018-05-25 15:57:33 +02:00
|
|
|
{% for key, value in nsd_local_server_config.items() -%}
|
2016-03-27 18:16:46 +02:00
|
|
|
{{ expand_list(key, value) }}
|
|
|
|
{%- endfor %}
|
2016-03-27 18:06:15 +02:00
|
|
|
{% endif %}
|
2016-03-26 17:54:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Include zone definitions
|
2017-09-01 10:55:03 +02:00
|
|
|
include: "{{ nsd_zones_config_file }}"
|
2016-03-26 17:54:31 +01:00
|
|
|
|