mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-16 17:50:23 +00:00
Changed zone file path
This commit is contained in:
parent
8d93eabd86
commit
29ea62ec21
1 changed files with 21 additions and 21 deletions
|
@ -8,59 +8,59 @@
|
||||||
|
|
||||||
{%- macro zone(key, args, file, masters) %}
|
{%- macro zone(key, args, file, masters) %}
|
||||||
zone "{{ key }}" {
|
zone "{{ key }}" {
|
||||||
type {{ args['type'] }};
|
type {{ args['type'] }};
|
||||||
{% if args['type'] == 'forward' -%}
|
{% if args['type'] == 'forward' -%}
|
||||||
{% if args['forward'] is defined -%}
|
{% if args['forward'] is defined -%}
|
||||||
forward {{ args['forward'] }};
|
forward {{ args['forward'] }};
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
forwarders {
|
forwarders {
|
||||||
{% for forwarder in args.forwarders -%}
|
{% for forwarder in args.forwarders -%}
|
||||||
{{ forwarder }};
|
{{ forwarder }};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
};
|
};
|
||||||
{% else -%}
|
{% else -%}
|
||||||
{% if args['dnssec'] is defined and args['dnssec'] -%}
|
{% if args['dnssec'] is defined and args['dnssec'] -%}
|
||||||
file "{{ map.named_directory }}/{{ file }}.signed";
|
file "{{ file }}.signed";
|
||||||
{% else -%}
|
{% else -%}
|
||||||
file "{{ map.named_directory }}/{{ file }}";
|
file "{{ file }}";
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args['allow-update'] is defined %}
|
{%- if args['allow-update'] is defined %}
|
||||||
allow-update { {{args['allow-update']}}; };
|
allow-update { {{args['allow-update']}}; };
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args.update_policy is defined %}
|
{%- if args.update_policy is defined %}
|
||||||
update-policy {
|
update-policy {
|
||||||
{%- for policy in args.update_policy %}
|
{%- for policy in args.update_policy %}
|
||||||
{{ policy }};
|
{{ policy }};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
};
|
};
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args['allow-transfer'] is defined %}
|
{%- if args['allow-transfer'] is defined %}
|
||||||
allow-transfer { {{ args.get('allow-transfer', []) | join('; ') }}; };
|
allow-transfer { {{ args.get('allow-transfer', []) | join('; ') }}; };
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args['also-notify'] is defined %}
|
{%- if args['also-notify'] is defined %}
|
||||||
also-notify { {{ args.get('also-notify', []) | join('; ') }}; };
|
also-notify { {{ args.get('also-notify', []) | join('; ') }}; };
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args['type'] == 'slave' %}
|
{%- if args['type'] == 'slave' %}
|
||||||
{%- if args['allow-notify'] is defined %}
|
{%- if args['allow-notify'] is defined %}
|
||||||
allow-notify { {{ args.get('allow-notify', []) | join('; ') }}; };
|
allow-notify { {{ args.get('allow-notify', []) | join('; ') }}; };
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if args['type'] == "master" -%}
|
{%- if args['type'] == "master" -%}
|
||||||
{% if args['notify'] %}
|
{% if args['notify'] %}
|
||||||
notify yes;
|
notify yes;
|
||||||
{% else %}
|
{% else %}
|
||||||
notify no;
|
notify no;
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% else %}
|
{% else %}
|
||||||
notify no;
|
notify no;
|
||||||
{%- if masters is iterable and masters is not string %}
|
{%- if masters is iterable and masters is not string %}
|
||||||
masters {
|
masters {
|
||||||
{%- for item in masters %}
|
{%- for item in masters %}
|
||||||
{{ item }};
|
{{ item }};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
};
|
};
|
||||||
{%- else %}
|
{%- else %}
|
||||||
masters { {{ masters }} };
|
masters { {{ masters }} };
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -76,7 +76,7 @@ zone "{{ key }}" {
|
||||||
{%- for name, data in salt['pillar.get']('bind:configured_acls', {}).items() %}
|
{%- for name, data in salt['pillar.get']('bind:configured_acls', {}).items() %}
|
||||||
acl {{ name }} {
|
acl {{ name }} {
|
||||||
{%- for d in data %}
|
{%- for d in data %}
|
||||||
{{ d }};
|
{{ d }};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
};
|
};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue