ansible-role-bind/templates/dnssec.j2
Benjamen Meyer 8681f17bad Enhancement: Reverse DNS Zone Support
- Incomplete
- Creates the directory for the Reverse DNS Zones
- Fails to copy the files and apply the db-reverse.js template
- Not sure if DNSSEC is applicable on the reverse zone or not
2018-07-07 01:11:46 -04:00

18 lines
593 B
Django/Jinja

#!/bin/bash
# {{ ansible_managed }}
cd /etc/bind/keys
{% for zone, value in bind_zones.iteritems() %}
{% if 'dnssec' in value and value.dnssec %}
dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ zone }} -t /etc/bind/zones/db.{{ zone }}
{% endif %}
{% endfor %}
{% for zone, value in bind_reverse_zones.iteritems() %}
{% if 'dnssec' in value and value.dnssec %}
dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ zone }} -t /etc/bind/zones/db.{{ zone }}
{% endif %}
{% endfor %}
systemctl reload bind9