diff --git a/bind/config.sls b/bind/config.sls index a12349f..4b737f1 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -226,7 +226,7 @@ bind_rndc_client_config: #} {%- set zone_source = 'salt://bind/files/zone.jinja' if zone_records != {} else 'salt://' ~ map.zones_source_dir ~ '/' ~ file %} {%- set serial_auto = salt['pillar.get']('bind:available_zones:' + zone + ':soa:serial', '') == 'auto' %} -{% if file and zone_data['type'] == 'master' -%} +{% if file and zone_data['type'] == 'master' and (zone_data['managed'] is not defined or zone_data['managed']) -%} zones{{ dash_view }}-{{ zone }}{{ '.include' if serial_auto else '' }}: file.managed: - name: {{ zones_directory }}/{{ file }}{{ '.include' if serial_auto else '' }} diff --git a/pillar.example b/pillar.example index 5288aac..4f29207 100644 --- a/pillar.example +++ b/pillar.example @@ -173,6 +173,8 @@ bind: type: master # Yo don't have define zone again in available_zones. # This feature is backward compatibile and only available in debian notify: false # if type master you need specify notify true/false + managed: true # Set this to false if you don't want Salt to manage this zone file + # If this parameter is set to true or is not set at all, the zone will be managed through salt sub2.domain.com: file: sub2.domain.com