summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-05-05 01:46:46 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-06-06 18:31:17 +0200
commit812c3f4d6162cf7af8f8cbedb6abb6d72bd537e9 (patch)
tree109619457ac9b9028eae7297c4f72deadad68c52 /templates
parenttmp disable creation. (diff)
downloaddns-812c3f4d6162cf7af8f8cbedb6abb6d72bd537e9.tar.gz
dns-812c3f4d6162cf7af8f8cbedb6abb6d72bd537e9.tar.xz
"Working" product.
Diffstat (limited to 'templates')
-rw-r--r--templates/named-rndc.conf.epp2
-rw-r--r--templates/named.conf.epp6
-rw-r--r--templates/zone-serial.epp3
-rw-r--r--templates/zone.epp24
-rw-r--r--templates/zone1.epp15
-rw-r--r--templates/zone2.epp14
-rw-r--r--templates/zoneconf.epp6
7 files changed, 38 insertions, 32 deletions
diff --git a/templates/named-rndc.conf.epp b/templates/named-rndc.conf.epp
index 5c56cce..fd069a5 100644
--- a/templates/named-rndc.conf.epp
+++ b/templates/named-rndc.conf.epp
@@ -2,4 +2,4 @@ include "<%= $dns::rndc_key_file %>";
controls {
inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; };
-}
+};
diff --git a/templates/named.conf.epp b/templates/named.conf.epp
index c8f7fda..9fe10b1 100644
--- a/templates/named.conf.epp
+++ b/templates/named.conf.epp
@@ -1,12 +1,10 @@
options {
- directory "<%= $dns::zone_directory %>";
- forwarers { 8.8.8.8; 8.8.4.4; };
+ directory "<%= $dns::directory %>";
+ forwarders { 8.8.8.8; 8.8.4.4; };
recursion yes;
allow-query { any; };
dnssec-validation yes;
- empty-zone-enable yes;
-
listen-on-v6 { any; };
allow-recursion { localnets; localhost; };
diff --git a/templates/zone-serial.epp b/templates/zone-serial.epp
new file mode 100644
index 0000000..ba8ded9
--- /dev/null
+++ b/templates/zone-serial.epp
@@ -0,0 +1,3 @@
+<%- | Integer[0,4294967295] $serial,
+ | -%>
+ <%= $serial %> ; Serial
diff --git a/templates/zone.epp b/templates/zone.epp
deleted file mode 100644
index 7f374d2..0000000
--- a/templates/zone.epp
+++ /dev/null
@@ -1,24 +0,0 @@
-<%- | String $zone,
- String $mname,
- String $rname,
- Integer[0,4294967295] $serial,
- Dns::Ttl $refresh,
- Dns::Ttl $retry,
- Dns::Ttl $expire,
- Dns::Ttl $negative_ttl,
- Dns::Ttl $default_ttl,
- | -%>
-
-<%# The actual zonefile %>
-; File managed by Puppet.
-; Local changes WILL be overwritten!
-$ORIGIN <%= $zone %>
-$TTL <%= $default_ttl %>
-
-@ SOA <%= $mname %> <%= $rname %> (
- <%= $serial %>
- <%= $refresh %>
- <%= $retry %>
- <%= $expire %>
- <%= $negative_ttl %>
- )
diff --git a/templates/zone1.epp b/templates/zone1.epp
new file mode 100644
index 0000000..289fc2d
--- /dev/null
+++ b/templates/zone1.epp
@@ -0,0 +1,15 @@
+<%- | String $zone,
+ String $mname,
+ String $rname,
+ Dns::Ttl $default_ttl,
+ Optional[Dns::Ttl] $soa_ttl,
+ | -%>
+<%#
+First half of the Zonefile's header, up until the serial field.
+-%>
+; File managed by Puppet.
+; Local changes WILL be overwritten!
+$ORIGIN <%= $zone %>
+$TTL <%= $default_ttl %>
+
+@ <%= $soa_ttl %> IN SOA <%= $mname %> <%= $rname %> (
diff --git a/templates/zone2.epp b/templates/zone2.epp
new file mode 100644
index 0000000..0663466
--- /dev/null
+++ b/templates/zone2.epp
@@ -0,0 +1,14 @@
+<%- | Dns::Ttl $refresh,
+ Dns::Ttl $retry,
+ Dns::Ttl $expire,
+ Dns::Ttl $negative_ttl,
+ | -%>
+<%#
+Second half of the Zonefile's header. Everything after the serial
+fiel.d
+-%>
+ <%= $refresh %> ; Refresh
+ <%= $retry %> ; Retry
+ <%= $expire %> ; Expire
+ <%= $negative_ttl %> ; Negative TTL
+ )
diff --git a/templates/zoneconf.epp b/templates/zoneconf.epp
index cb702be..af0d6af 100644
--- a/templates/zoneconf.epp
+++ b/templates/zoneconf.epp
@@ -1,14 +1,14 @@
<%- | String $zone,
String $type,
- String $update_policy,
+ Optional[String] $update_policy,
| -%>
<%# one zone entry for the bind9 configuration file %>
zone "<%= $zone %>" {
type <%= $type %>;
- file "zones/<%= $zone %>.db";
+ file "zones/<%= $zone %>db";
<%- if $type == 'master' or $type == 'slave' { %>
- journal "journal/<%= $zone %>.jnl";
+ journal "journal/<%= $zone %>jnl";
<%- } %>