From ae9415c3e71e714280e58ee67773a82b77e7bb52 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 24 Jan 2018 15:36:25 +0100 Subject: [PATCH 1/3] [suse]: fix passing map.local_config into template avoids hard to debug messages about undefined Jinja variable 'map' --- bind/config.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bind/config.sls b/bind/config.sls index ef50684..275c076 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -82,6 +82,8 @@ bind_default_config: - user: root - group: root - mode: 644 + - context: + map: {{ map }} - watch_in: - service: bind_restart {% endif %} From 8549b637baa6b6a116bcf2fa54339894ac152e65 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 24 Jan 2018 15:48:50 +0100 Subject: [PATCH 2/3] [suse] nicer template - add salt warning - drop blank line to reduce diff to original file --- bind/files/suse/default | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bind/files/suse/default b/bind/files/suse/default index adce6aa..b8a6997 100644 --- a/bind/files/suse/default +++ b/bind/files/suse/default @@ -1,3 +1,5 @@ +# This file is managed by salt - DO NOT EDIT! + {% set protocol = salt['pillar.get']('bind:config:protocol', False) -%} {% set param = [] -%} {% if protocol -%} @@ -5,7 +7,6 @@ {% endif -%} ## Path: Network/DNS/Name Server ## Description: Names server settings - ## Type: yesno ## Default: yes ## ServiceRestart: lwresd,named From 1c725851b8c55e95e0fdb5ffdc69981598557a9a Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 24 Jan 2018 15:59:16 +0100 Subject: [PATCH 3/3] drop duplicate entry --- bind/config.sls | 1 - 1 file changed, 1 deletion(-) diff --git a/bind/config.sls b/bind/config.sls index 275c076..380fdbb 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -24,7 +24,6 @@ bind_restart: - user: {{ salt['pillar.get']('bind:config:user', map.user) }} - group: {{ salt['pillar.get']('bind:config:group', map.group) }} - mode: {{ salt['pillar.get']('bind:config:log_mode', map.log_mode) }} - - replace: False - require: - file: {{ map.log_dir }}