]> Frank Brehm's Git Trees - salt/states.git/commitdiff
Adding state bind.default_zones
authorFrank Brehm <frank@brehm-online.com>
Wed, 9 Mar 2016 06:34:34 +0000 (07:34 +0100)
committerFrank Brehm <frank@brehm-online.com>
Wed, 9 Mar 2016 06:34:34 +0000 (07:34 +0100)
bind/default_zones.sls [new file with mode: 0644]
bind/files/zones.rfc1918 [new file with mode: 0644]
bind/init.sls

diff --git a/bind/default_zones.sls b/bind/default_zones.sls
new file mode 100644 (file)
index 0000000..0b77205
--- /dev/null
@@ -0,0 +1,43 @@
+
+/etc/bind/db.0:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/db.127:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/db.255:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/db.empty:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/db.local:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/db.root:
+  file.exists:
+    - require:
+      - file: /etc/bind
+
+/etc/bind/zones.rfc1918:
+  file.managed:
+    - source: salt://bind/files/zones.rfc1918
+    - user: root
+    - group: root
+    - mode: 644
+    - template: jinja
+    - backup: minion
+    - require:
+      - file: /etc/bind
+      - file: /etc/bind/db.empty
+
diff --git a/bind/files/zones.rfc1918 b/bind/files/zones.rfc1918
new file mode 100644 (file)
index 0000000..e139e0c
--- /dev/null
@@ -0,0 +1,30 @@
+//###############################################################
+//# Bind9-Konfigurationsdatei Default zones RFC 1918
+//# /etc/bind/zones.rfc1918
+//#
+//# Host {{ grains['fqdn'] }}
+//#
+//###############################################################
+
+zone "10.in-addr.arpa"      { type master; file "/etc/bind/db.empty"; };
+zone "16.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "17.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "18.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "19.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "20.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "21.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "22.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "23.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "24.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "25.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "26.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "27.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "28.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "29.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "30.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+zone "31.172.in-addr.arpa"  { type master; file "/etc/bind/db.empty"; };
+
+zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
+
+# vim: ts=4 filetype=named noai
index d7fb812f05936a1d1ba6e703e3aa93a84f1a9c53..d512b3c26a780b7c3a02bef5a9c336af566397be 100644 (file)
@@ -3,4 +3,5 @@ include:
   - bind.user
   - bind.dirs
   - bind.rndc
+  - bind.default_zones
   - bind.conf