]> Frank Brehm's Git Trees - salt/states.git/commitdiff
Adding bind/conf.sls
authorFrank Brehm <frank@brehm-online.com>
Tue, 8 Mar 2016 17:43:18 +0000 (18:43 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 8 Mar 2016 17:43:18 +0000 (18:43 +0100)
bind/conf.sls [new file with mode: 0644]
bind/files/named-acl.conf [new file with mode: 0644]
bind/init.sls

diff --git a/bind/conf.sls b/bind/conf.sls
new file mode 100644 (file)
index 0000000..7eb9da3
--- /dev/null
@@ -0,0 +1,11 @@
+
+/etc/bind/named-acl.conf:
+  file.managed:
+    - source: salt://bind/files/named-acl.conf
+    - user: root
+    - group: root
+    - mode: 644
+    - template: jinja
+    - backup: minion
+    - require:
+      - file: /etc/bind
diff --git a/bind/files/named-acl.conf b/bind/files/named-acl.conf
new file mode 100644 (file)
index 0000000..e95365f
--- /dev/null
@@ -0,0 +1,22 @@
+{%- set acls = salt['pillar.get']('bind:acl', {})  -%}
+//###############################################################
+//# Bind9-Konfigurationsdatei - Access-Control-Listen
+//# /etc/bind/named-acl.conf
+//#
+//# Host {{ grains['fqdn'] }}
+//#
+//###############################################################
+
+//###############################################################
+//# Access-Control-Listen
+{%- for acl_name in acls|sort %}
+
+#----------------------------------------
+acl {{ acl_name }} {
+{%- for entry in acls.get(acl_name) %}
+       {{ entry }};
+{%- endfor %}
+};
+{%- endfor %}
+
+# vim: ts=4 filetype=named noai
index 30be2676da14501aa15cf8c37c2a2b003d20c149..d7fb812f05936a1d1ba6e703e3aa93a84f1a9c53 100644 (file)
@@ -3,3 +3,4 @@ include:
   - bind.user
   - bind.dirs
   - bind.rndc
+  - bind.conf