diff --git a/bind/files/arch/named.conf.local b/bind/files/arch/named.conf.local index f03024f..a7fb87c 100644 --- a/bind/files/arch/named.conf.local +++ b/bind/files/arch/named.conf.local @@ -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 %} }; diff --git a/bind/files/debian/named.conf.local b/bind/files/debian/named.conf.local index 5f6ff5a..c8c1321 100644 --- a/bind/files/debian/named.conf.local +++ b/bind/files/debian/named.conf.local @@ -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 %} }; diff --git a/bind/files/freebsd/named.conf.local b/bind/files/freebsd/named.conf.local index 2e2f8ae..43e9fda 100644 --- a/bind/files/freebsd/named.conf.local +++ b/bind/files/freebsd/named.conf.local @@ -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 %} }; diff --git a/pillar.example b/pillar.example index 486230b..abe8d31 100644 --- a/pillar.example +++ b/pillar.example @@ -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