From fdf20d56328cf5e8f6aeb162f19fbc7f40b4c628 Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Thu, 12 Jan 2017 14:56:27 +0100 Subject: [PATCH] FreeBSD: disable default_zones when views are used --- bind/files/freebsd/named.conf | 2 ++ pillar.example | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bind/files/freebsd/named.conf b/bind/files/freebsd/named.conf index 80d8da6..79d63c6 100644 --- a/bind/files/freebsd/named.conf +++ b/bind/files/freebsd/named.conf @@ -84,6 +84,7 @@ options { {%- endfor %} }; +{%- if salt['pillar.get']('bind:config:default_zones', False) and not salt['pillar.get']('bind:configured_views', False) %} // If you enable a local name server, don't forget to enter 127.0.0.1 // first in your /etc/resolv.conf so this server will be queried. // Also, make sure to enable it in /etc/rc.conf. @@ -374,6 +375,7 @@ zone "1.168.192.in-addr.arpa" { }; }; */ +{% endif %} include "{{ map.local_config }}"; {%- if 'keys' in salt['pillar.get']('bind') %} diff --git a/pillar.example b/pillar.example index e5f387c..f11b3dc 100644 --- a/pillar.example +++ b/pillar.example @@ -29,7 +29,7 @@ bind: # (ipv4: 4, ipv6: 6). Omitting this reverts to # binds default of both. -# Debian based systems +# Debian and FreeBSD based systems default_zones: True # If set to True, the default-zones configuration # will be enabled. Defaults to False.