feat(config.sls): allow to not manage zone file

This commit is contained in:
sylvainfaivre 2021-08-10 18:04:00 +02:00
parent 52d3221f03
commit 2d069544f6
2 changed files with 3 additions and 1 deletions

View file

@ -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 '' }}

View file

@ -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