--- /dev/null
+{%- set dnssec = salt['pillar.get']('bind:dnssec', {}) -%}
+{%- set etc_dir = salt['pillar.get']('bind:etc-dir', '/etc/bind') -%}
+
+dyndnsupdater-keyfile-public:
+ file.managed:
+ - name: {{ etc_dir }}/dnssec/K{{ dnssec.dyndnsupdater.name }}.+{{ dnssec.dyndnsupdater.algo_nr }}+{{ dnssec.dyndnsupdater.footprint }}.key
+ - source: salt://bind/files/dyndnsupdater.public
+ - user: root
+ - group: root
+ - mode: 600
+ - template: jinja
+ - backup: minion
+ - require:
+ - pkg: bind
+ - file: bind-dnssec-dir
+
+dyndnsupdater-keyfile-private:
+ file.managed:
+ - name: {{ etc_dir }}/dnssec/K{{ dnssec.dyndnsupdater.name }}.+{{ dnssec.dyndnsupdater.algo_nr }}+{{ dnssec.dyndnsupdater.footprint }}.private
+ - source: salt://bind/files/dyndnsupdater.private
+ - user: root
+ - group: root
+ - mode: 600
+ - template: jinja
+ - backup: minion
+ - require:
+ - pkg: bind
+ - file: bind-dnssec-dir
+
--- /dev/null
+{%- set dnssec = salt['pillar.get']('bind:dnssec', {}) -%}
+Private-key-format: v1.2
+Algorithm: {{ dnssec.dyndnsupdater.algo_nr }} ({{ dnssec.dyndnsupdater.algo_name }})
+Key: {{ dnssec.dyndnsupdater.key }}
+Bits: {{ dnssec.dyndnsupdater.bits }}
--- /dev/null
+{%- set dnssec = salt['pillar.get']('bind:dnssec', {}) -%}
+{{ dnssec.dyndnsupdater.name }}. IN KEY {{ dnssec.dyndnsupdater.bits_num }} 3 {{ dnssec.dyndnsupdater.algo_nr }} {{ dnssec.dyndnsupdater.key }}
{%- set home_dir = salt['pillar.get']('bind:home-dir', '/var/cache/bind') -%}
{%- set etc_dir = salt['pillar.get']('bind:etc-dir', '/etc/bind') -%}
+{%- set dnssec = salt['pillar.get']('bind:dnssec', {}) -%}
//###############################################################
//# Bind9-Konfigurationsdatei for general options
//# /etc/bind/named.conf.options
// Managed Keys
include "{{ etc_dir }}/bind.keys";
+key "{{ dnssec.dyndnsupdater.name }}" {
+ algorithm {{ dnssec.dyndnsupdater.algo_name|lower|replace('_', '-') }};
+ secret "{{ dnssec.dyndnsupdater.key }}";
+};
+
//###############################################################
//# Kontrollkanäle für RNDC
- bind.user
- bind.dirs
- bind.rndc
+ - bind.dyndnsupdater
- bind.default_zones
- bind.conf