bind-formula/bind/files/debian/named.conf.options
Bernhard M. Wiedemann 353a8dfc15 Sort hashes
To process hash entries in deterministic order.

Without this patch, config entries were different for every run
and required a service restart when nothing actually changed.

Doing it similar to
0fe2f7e66b
2018-08-31 15:03:48 +02:00

41 lines
1.3 KiB
Text

{%- set key_directory = salt['pillar.get']('bind:lookup:key_directory', key_directory) %}
options {
directory "{{ named_directory }}";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
auth-nxdomain no; # conform to RFC1035
{%- if salt['pillar.get']('bind:config:ipv6', False) %}
listen-on-v6 { {{ salt['pillar.get']('bind:config:ipv6_listen', 'any') }}; };
{%- endif -%}
{%- if key_directory %}
key-directory "{{ key_directory }}";
{%- endif -%}
{#- Allow inclusion of arbitrary statements #}
{%- for statement, value in salt['pillar.get']('bind:config:options', {})|dictsort -%}
{%- if value is iterable and value is not string %}
{{ statement }} {
{%- for item in value %}
{{ item }};
{%- endfor %}
};
{%- else %}
{{ statement }} {{ value }};
{%- endif %}
{%- endfor %}
};