diff --git a/nsd/config/zones.sls b/nsd/config/zones.sls index f4f612c..c93ad2d 100644 --- a/nsd/config/zones.sls +++ b/nsd/config/zones.sls @@ -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 %} diff --git a/pillar.example b/pillar.example index d3ee892..60ad7f0 100644 --- a/pillar.example +++ b/pillar.example @@ -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