diff --git a/roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 index 7977574..97db90b 100644 --- a/roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 +++ b/roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 @@ -26,9 +26,8 @@ remote-control: control-enable: yes control-interface: /var/run/unbound.sock +{% for zone in unbound_zones %} auth-zone: - name: "home.foo.sh" - zonefile: "/var/unbound/db/home.foo.sh" -auth-zone: - name: "20.172.in-addr.arpa" - zonefile: "/var/unbound/db/20.172.in-addr.arpa" + name: "{{ zone }}" + zonefile: "{{ unbound_zonedir }}/{{ zone }}" +{% endfor %} diff --git a/roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 index c7090c2..59d99d8 100644 --- a/roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 +++ b/roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 @@ -26,9 +26,8 @@ remote-control: control-enable: yes control-interface: /var/run/unbound.sock +{% for zone in unbound_zones %} auth-zone: - name: "home.foo.sh" - zonefile: "/var/unbound/db/home.foo.sh" -auth-zone: - name: "20.172.in-addr.arpa" - zonefile: "/var/unbound/db/20.172.in-addr.arpa" + name: "{{ zone }}" + zonefile: "{{ unbound_zonedir }}/{{ zone }}" +{% endfor %} diff --git a/roles/unbound/templates/unbound.conf.frigate02.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.frigate02.home.foo.sh.j2 index a4d3f59..4fa13e5 100644 --- a/roles/unbound/templates/unbound.conf.frigate02.home.foo.sh.j2 +++ b/roles/unbound/templates/unbound.conf.frigate02.home.foo.sh.j2 @@ -30,9 +30,8 @@ forward-zone: name: "." forward-addr: 172.20.20.10@853#dns.home.foo.sh +{% for zone in unbound_zones %} auth-zone: - name: "cam.foo.sh" - zonefile: "/var/lib/unbound/cam.foo.sh" -auth-zone: - name: "26.20.172.in-addr.arpa" - zonefile: "/var/lib/unbound/26.20.172.in-addr.arpa" + name: "{{ zone }}" + zonefile: "{{ unbound_zonedir }}/{{ zone }}" +{% endfor %} diff --git a/roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 index a842fcd..5812def 100644 --- a/roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 +++ b/roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 @@ -30,9 +30,8 @@ forward-zone: name: "." forward-addr: 172.20.20.10@853#dns.home.foo.sh +{% for zone in unbound_zones %} auth-zone: - name: "oob.foo.sh" - zonefile: "/var/lib/unbound/oob.foo.sh" -auth-zone: - name: "25.20.172.in-addr.arpa" - zonefile: "/var/lib/unbound/25.20.172.in-addr.arpa" + name: "{{ zone }}" + zonefile: "{{ unbound_zonedir }}/{{ zone }}" +{% endfor %} diff --git a/roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 index 4799b50..46a4ab4 100644 --- a/roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 +++ b/roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 @@ -30,9 +30,8 @@ forward-zone: name: "." forward-addr: 172.20.20.10@853#dns.home.foo.sh +{% for zone in unbound_zones %} auth-zone: - name: "print.foo.sh" - zonefile: "/var/lib/unbound/print.foo.sh" -auth-zone: - name: "24.20.172.in-addr.arpa" - zonefile: "/var/lib/unbound/24.20.172.in-addr.arpa" + name: "{{ zone }}" + zonefile: "{{ unbound_zonedir }}/{{ zone }}" +{% endfor %}