mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-16 17:50:23 +00:00
37 lines
961 B
Text
37 lines
961 B
Text
//
|
|
// Do any local configuration here
|
|
//
|
|
|
|
// Consider adding the 1918 zones here, if they are not used in your
|
|
// organization
|
|
//include "/etc/bind/zones.rfc1918";
|
|
|
|
{% for key,args in salt['pillar.get']('bind:configured_zones', {}).items() -%}
|
|
{%- set file = salt['pillar.get']("bind:available_zones:" + key + ":file") %}
|
|
{%- set masters = salt['pillar.get']("bind:available_zones:" + key + ":masters") %}
|
|
zone "{{ key }}" {
|
|
type {{ args['type'] }};
|
|
{% if args['type'] == 'forward' -%}
|
|
{% if args['forward'] is defined -%}
|
|
forward {{ args['forward'] }};
|
|
{%- endif %}
|
|
forwarders {
|
|
{% for forwarder in args.forwarders -%}
|
|
{{ forwarder }};
|
|
{%- endfor %}
|
|
};
|
|
{% else -%}
|
|
file "data/{{ file }}";
|
|
{% if args['type'] == "master" -%}
|
|
{% if args['notify'] -%}
|
|
notify yes;
|
|
{% else -%}
|
|
notify no;
|
|
{%- endif -%}
|
|
{% else -%}
|
|
notify no;
|
|
masters { {{ masters }} };
|
|
{%- endif %}
|
|
{%- endif %}
|
|
};
|
|
{% endfor %}
|