Merge pull request #76 from kiwiz/masters_list

Support list of `masters` in `named.conf.local` template
This commit is contained in:
Javier Bértoli 2017-07-12 07:45:20 -03:00 committed by GitHub
commit 3a15babe35
4 changed files with 29 additions and 4 deletions

View file

@ -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 %}
};

View file

@ -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 %}
};

View file

@ -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 %}
};

View file

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