mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-17 02:00:23 +00:00
82 lines
2.3 KiB
Text
82 lines
2.3 KiB
Text
//
|
|
// named.conf
|
|
//
|
|
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
|
|
// server as a caching only nameserver (as a localhost DNS resolver only).
|
|
//
|
|
// See /usr/share/doc/bind*/sample/ for example named configuration files.
|
|
//
|
|
|
|
options {
|
|
directory "/var/named";
|
|
dump-file "/var/named/data/cache_dump.db";
|
|
statistics-file "/var/named/data/named_stats.txt";
|
|
memstatistics-file "/var/named/data/named_mem_stats.txt";
|
|
|
|
{#- Allow inclusion of arbitrary statements #}
|
|
{%- for statement, value in salt['pillar.get']('bind:config:options', map.get('options', {})).items() -%}
|
|
{%- if value is iterable and value is not string %}
|
|
{{ statement }} {
|
|
{%- for item in value %}
|
|
{{ item }};
|
|
{%- endfor %}
|
|
};
|
|
{%- else %}
|
|
{{ statement }} {{ value }};
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
/* Path to ISC DLV key */
|
|
bindkeys-file "/etc/named.iscdlv.key";
|
|
|
|
managed-keys-directory "/var/named/dynamic";
|
|
};
|
|
|
|
logging {
|
|
channel default_debug {
|
|
file "data/named.run";
|
|
severity dynamic;
|
|
};
|
|
|
|
{%- for channel, value in salt['pillar.get']('bind:config:logging:channels', {}).items() -%}
|
|
{%- if value is iterable %}
|
|
channel {{ channel }} {
|
|
{%- for statement, item in value.items() %}
|
|
{{ statement }} {{ item }};
|
|
{%- endfor %}
|
|
};
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
{%- for statement, value in salt['pillar.get']('bind:config:logging:category', {}).items() -%}
|
|
category {{ statement }} {
|
|
{%- for item in value %}
|
|
{{ item }};
|
|
{%- endfor %}
|
|
};
|
|
{%- endfor %}
|
|
|
|
{%- for statement, value in salt['pillar.get']('bind:config:logging', {}).items() -%}
|
|
{%- if statement not in ( 'channels', 'category' ) %}
|
|
{%- if value is iterable and value is not string %}
|
|
{{ statement }} {
|
|
{%- for item in value %}
|
|
{{ item }};
|
|
{%- endfor %}
|
|
};
|
|
{%- else %}
|
|
{{ statement }} {{ value }};
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
};
|
|
|
|
zone "." IN {
|
|
type hint;
|
|
file "named.ca";
|
|
};
|
|
|
|
include "/etc/named.rfc1912.zones";
|
|
include "{{ map.local_config }}";
|
|
include "/etc/named.root.key";
|