Skip to content

Commit 2d06954

Browse files
committed
feat(config.sls): allow to not manage zone file
1 parent 52d3221 commit 2d06954

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bind/config.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bind_rndc_client_config:
226226
#}
227227
{%- set zone_source = 'salt://bind/files/zone.jinja' if zone_records != {} else 'salt://' ~ map.zones_source_dir ~ '/' ~ file %}
228228
{%- set serial_auto = salt['pillar.get']('bind:available_zones:' + zone + ':soa:serial', '') == 'auto' %}
229-
{% if file and zone_data['type'] == 'master' -%}
229+
{% if file and zone_data['type'] == 'master' and (zone_data['managed'] is not defined or zone_data['managed']) -%}
230230
zones{{ dash_view }}-{{ zone }}{{ '.include' if serial_auto else '' }}:
231231
file.managed:
232232
- name: {{ zones_directory }}/{{ file }}{{ '.include' if serial_auto else '' }}

pillar.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ bind:
173173
type: master # Yo don't have define zone again in available_zones.
174174
# This feature is backward compatibile and only available in debian
175175
notify: false # if type master you need specify notify true/false
176+
managed: true # Set this to false if you don't want Salt to manage this zone file
177+
# If this parameter is set to true or is not set at all, the zone will be managed through salt
176178

177179
sub2.domain.com:
178180
file: sub2.domain.com

0 commit comments

Comments
 (0)