feat(zones): skip on slave servers
Introduce 'nsd:opmode' pillar option, allowing the zone file management to be skipped on slave DNS servers. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
5023b5e0a3
commit
5e4711d87c
@ -10,11 +10,14 @@
|
||||
{%- from tplroot ~ "/macros.jinja" import zonefile_name with context %}
|
||||
|
||||
{%- set zones = nsd.get('zones', {}) %}
|
||||
{%- set opmode = nsd.get('opmode', 'master') %}
|
||||
|
||||
{%- if zones | length > 0 %}
|
||||
|
||||
{{ config_file('90-generated-zones', 'generated-zones') }}
|
||||
|
||||
{%- if opmode == 'master' %}
|
||||
|
||||
nsd-config-zones-file-directory:
|
||||
file.directory:
|
||||
- name: {{ nsd.zones_dir }}
|
||||
@ -53,3 +56,4 @@ nsd-config-zones-file-directory:
|
||||
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
@ -60,6 +60,9 @@ nsd:
|
||||
control-enable: 'yes'
|
||||
control-interface: /run/nsd.sock
|
||||
|
||||
# If this option is defined and set to 'slave', no DNS zone files will be installed
|
||||
# opmode: slave
|
||||
|
||||
tofs:
|
||||
# The files_switch key serves as a selector for alternative
|
||||
# directories under the formula files directory. See TOFS pattern
|
||||
|
Loading…
Reference in New Issue
Block a user