mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-15 17:20:21 +00:00
Merge pull request #76 from kiwiz/masters_list
Support list of `masters` in `named.conf.local` template
This commit is contained in:
commit
3a15babe35
4 changed files with 29 additions and 4 deletions
|
@ -35,7 +35,15 @@ zone "{{ key }}" {
|
|||
{%- endif -%}
|
||||
{% else %}
|
||||
notify no;
|
||||
masters { {{ masters }} };
|
||||
{%- if masters is iterable and masters is not string %}
|
||||
masters {
|
||||
{%- for item in masters %}
|
||||
{{ item }};
|
||||
{%- endfor %}
|
||||
};
|
||||
{%- else %}
|
||||
masters { {{ masters }} };
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
};
|
||||
|
|
|
@ -49,7 +49,15 @@ zone "{{ key }}" {
|
|||
{%- endif -%}
|
||||
{% else %}
|
||||
notify no;
|
||||
masters { {{ masters }} };
|
||||
{%- if masters is iterable and masters is not string %}
|
||||
masters {
|
||||
{%- for item in masters %}
|
||||
{{ item }};
|
||||
{%- endfor %}
|
||||
};
|
||||
{%- else %}
|
||||
masters { {{ masters }} };
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
};
|
||||
|
|
|
@ -49,7 +49,15 @@ zone "{{ key }}" {
|
|||
{%- endif -%}
|
||||
{% else %}
|
||||
notify no;
|
||||
masters { {{ masters }} };
|
||||
{%- if masters is iterable and masters is not string %}
|
||||
masters {
|
||||
{%- for item in masters %}
|
||||
{{ item }};
|
||||
{%- endfor %}
|
||||
};
|
||||
{%- else %}
|
||||
masters { {{ masters }} };
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
};
|
||||
|
|
|
@ -108,4 +108,5 @@ bind:
|
|||
available_zones:
|
||||
sub.domain.org:
|
||||
file: db.sub.domain.org # DB file containing our zone
|
||||
masters: "192.168.0.1;" # Masters of this zone
|
||||
masters: # Masters of this zone
|
||||
- 192.168.0.1
|
||||
|
|
Loading…
Add table
Reference in a new issue