From: Frank Brehm Date: Wed, 9 Mar 2016 06:34:34 +0000 (+0100) Subject: Adding state bind.default_zones X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ccece6c9bcce7e73fdf056852bd7723516daf3aa;p=salt%2Fstates.git Adding state bind.default_zones --- diff --git a/bind/default_zones.sls b/bind/default_zones.sls new file mode 100644 index 0000000..0b77205 --- /dev/null +++ b/bind/default_zones.sls @@ -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 index 0000000..e139e0c --- /dev/null +++ b/bind/files/zones.rfc1918 @@ -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 diff --git a/bind/init.sls b/bind/init.sls index d7fb812..d512b3c 100644 --- a/bind/init.sls +++ b/bind/init.sls @@ -3,4 +3,5 @@ include: - bind.user - bind.dirs - bind.rndc + - bind.default_zones - bind.conf