Support list of masters in named.conf.local template

Updates the archlinux, debian, freebsd templates to support passing a
list of values to `masters` instead of a string. This is already
supported by the redhat template, but lacking in the other 3.
This commit is contained in:
K 2017-07-11 23:11:10 -04:00
parent 4b6ea1e809
commit c9f29af2b5
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