From ea66c97e7ea982f8f06d0f2bef041ddaccbed2b8 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 Feb 2015 23:04:16 +0100 Subject: [PATCH 1/2] Fix some pillar paths for key "available_zones". --- bind/config.sls | 2 +- bind/files/debian/named.conf.local | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bind/config.sls b/bind/config.sls index 98fef95..a0cb04d 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -130,7 +130,7 @@ bind_default_zones: {% endif %} {% for key,args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%} -{%- set file = salt['pillar.get']("available_zones:" + key + ":file") %} +{%- set file = salt['pillar.get']("bind:available_zones:" + key + ":file") %} {% if args['type'] == "master" -%} zones-{{ file }}: file.managed: diff --git a/bind/files/debian/named.conf.local b/bind/files/debian/named.conf.local index 23b4f6c..3376cf9 100644 --- a/bind/files/debian/named.conf.local +++ b/bind/files/debian/named.conf.local @@ -8,8 +8,8 @@ //include "/etc/bind/zones.rfc1918"; {% for key,args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%} -{%- set file = salt['pillar.get']("available_zones:" + key + ":file") %} -{%- set masters = salt['pillar.get']("available_zones:" + key + ":masters") %} +{%- set file = salt['pillar.get']("bind:available_zones:" + key + ":file") %} +{%- set masters = salt['pillar.get']("bind:available_zones:" + key + ":masters") %} zone "{{ key }}" { type {{ args['type'] }}; {% if args['dnssec'] is defined and args['dnssec'] -%} From f3ca2c660b1219ef92efc909914946c1d7dd0fdc Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2015 23:17:11 +0100 Subject: [PATCH 2/2] Move available_zones to bind key. --- pillar.example | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pillar.example b/pillar.example index 9d72ce2..82f4c84 100644 --- a/pillar.example +++ b/pillar.example @@ -30,7 +30,8 @@ bind: allow-update: "key core_dhcp" notify: True -available_zones: - sub.domain.org: - file: db.sub.domain.org - masters: "192.168.0.1;" +bind: + available_zones: + sub.domain.org: + file: db.sub.domain.org + masters: "192.168.0.1;"