summaryrefslogtreecommitdiffstats
path: root/roles/dnsserver
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2018-12-06 19:20:04 +0100
committerMatthieu Saulnier <fantom@fedoraproject.org>2018-12-06 19:20:04 +0100
commit50f921241ee4f892a1ebc4a0b723fec7ef3c6ec6 (patch)
tree6277e78663021e19932ff78158152d8ce8a850e7 /roles/dnsserver
parent1d2355757ad7fdb9af73aaec4fc648cfaae7fc9c (diff)
downloadplaybooks-ansible-50f921241ee4f892a1ebc4a0b723fec7ef3c6ec6.tar.gz
playbooks-ansible-50f921241ee4f892a1ebc4a0b723fec7ef3c6ec6.tar.xz
playbooks-ansible-50f921241ee4f892a1ebc4a0b723fec7ef3c6ec6.zip
Fix template in dnsserver role
Diffstat (limited to 'roles/dnsserver')
-rw-r--r--roles/dnsserver/templates/named.conf.j28
-rw-r--r--roles/dnsserver/templates/rndc.key.j28
2 files changed, 10 insertions, 6 deletions
diff --git a/roles/dnsserver/templates/named.conf.j2 b/roles/dnsserver/templates/named.conf.j2
index 5d95298..d3cb657 100644
--- a/roles/dnsserver/templates/named.conf.j2
+++ b/roles/dnsserver/templates/named.conf.j2
@@ -57,9 +57,11 @@ options {
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
+{% if ansible_distribution == "Fedora" %}
/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
include "/etc/crypto-policies/back-ends/bind.config";
+{% endif -%}
};
logging {
@@ -117,9 +119,9 @@ logging {
};
{% for key in keylist %}
-key "{{ key.0 }}" {
- algorithm {{ key.2 }};
- secret "{{ key.1 }}";
+key "{{ key.name }}" {
+ algorithm {{ key.algo }};
+ secret "{{ key.secret }}";
};
{% endfor %}
diff --git a/roles/dnsserver/templates/rndc.key.j2 b/roles/dnsserver/templates/rndc.key.j2
index 2caad4e..169133f 100644
--- a/roles/dnsserver/templates/rndc.key.j2
+++ b/roles/dnsserver/templates/rndc.key.j2
@@ -1,4 +1,6 @@
-key "rndc-key" {
- algorithm {{ keylist.rndc.algo }};
- secret "{{ keylist.rndc.secret }}";
+{% for key in keylist %}
+key "{{ key.name }}" {
+ algorithm {{ key.algo }};
+ secret "{{ key.secret }}";
};
+{% endfor %}