Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
sylvainfaivre marked this conversation as resolved.
Show resolved Hide resolved
# 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