Skip to content

Commit

Permalink
Merge pull request #150 from sylvainfaivre/managed-zone-option
Browse files Browse the repository at this point in the history
feat(config.sls): allow to not manage zone file
  • Loading branch information
javierbertoli authored Sep 13, 2021
2 parents af5333b + 2d06954 commit f6074b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bind/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 '' }}
Expand Down
2 changes: 2 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6074b5

Please sign in to comment.