feat: Add remote-servers support for BIND 9.20

This commit is contained in:
Daniel Akulenok
2025-12-07 20:15:41 +01:00
parent cfde49d95a
commit 26c6e7844d
2 changed files with 23 additions and 0 deletions

View File

@@ -54,3 +54,6 @@
{% if item.view is defined and item.view %}
{% include 'named.conf.view.j2' %}
{% endif %}
{% if item.remote_servers is defined and item.remote_servers %}
{% include 'named.conf.remote-servers.j2' %}
{% endif %}

View File

@@ -0,0 +1,20 @@
{% for server in item.remote_servers %}
remote-servers "{{ server.name }}" {
{% filter indent(bind9_config_indent, true) %}
{% for key, value in server.items() %}
{% if key != 'name' %}
{# Handle known complex types if any, otherwise default to simple string/block #}
{% if value is iterable and value is not string and value is not mapping %}
{{ key }} {
{% for subitem in value %}
{{ subitem }};
{% endfor %}
};
{% else %}
{{ key }} {{ value }};
{% endif %}
{% endif %}
{% endfor %}
{% endfilter %}
};
{% endfor %}