From: Frank Brehm Date: Tue, 8 Mar 2016 17:43:18 +0000 (+0100) Subject: Adding bind/conf.sls X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=0afe794937bbfdcd29acd68dc6a2f71677fc9f9a;p=salt%2Fstates.git Adding bind/conf.sls --- diff --git a/bind/conf.sls b/bind/conf.sls new file mode 100644 index 0000000..7eb9da3 --- /dev/null +++ b/bind/conf.sls @@ -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 index 0000000..e95365f --- /dev/null +++ b/bind/files/named-acl.conf @@ -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 diff --git a/bind/init.sls b/bind/init.sls index 30be267..d7fb812 100644 --- a/bind/init.sls +++ b/bind/init.sls @@ -3,3 +3,4 @@ include: - bind.user - bind.dirs - bind.rndc + - bind.conf