diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-05-05 00:31:37 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-05-05 00:31:37 +0200 |
commit | eb38e6252b3c52a44d0d33679b3bc3178674c7f8 (patch) | |
tree | b7958e38f9893c347af4c04a53f65a103cef3292 /templates | |
parent | Initial commit (diff) | |
download | dns-eb38e6252b3c52a44d0d33679b3bc3178674c7f8.tar.gz dns-eb38e6252b3c52a44d0d33679b3bc3178674c7f8.tar.xz |
Everything
Diffstat (limited to 'templates')
-rw-r--r-- | templates/key.epp | 8 | ||||
-rw-r--r-- | templates/named-rndc.conf.epp | 5 | ||||
-rw-r--r-- | templates/named.conf.epp | 13 | ||||
-rw-r--r-- | templates/zone.epp | 24 | ||||
-rw-r--r-- | templates/zoneconf.epp | 20 |
5 files changed, 70 insertions, 0 deletions
diff --git a/templates/key.epp b/templates/key.epp new file mode 100644 index 0000000..b64ae76 --- /dev/null +++ b/templates/key.epp @@ -0,0 +1,8 @@ +<%- | String $keyname, + String $algorithm, + String $secret, + | -%> +key "<%= $keyname %>" { + algorithm <%= $algorithm %>; + secret "<%= $secret %>"; +}; diff --git a/templates/named-rndc.conf.epp b/templates/named-rndc.conf.epp new file mode 100644 index 0000000..5c56cce --- /dev/null +++ b/templates/named-rndc.conf.epp @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..c8f7fda --- /dev/null +++ b/templates/named.conf.epp @@ -0,0 +1,13 @@ +options { + directory "<%= $dns::zone_directory %>"; + forwarers { 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.epp b/templates/zone.epp new file mode 100644 index 0000000..76fac34 --- /dev/null +++ b/templates/zone.epp @@ -0,0 +1,24 @@ +<%- | String $zone, + String $mname, + String $rname, + String $serial, + String $refresh, + String $retry, + String $expire, + String $negative_ttl, + String $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/zoneconf.epp b/templates/zoneconf.epp new file mode 100644 index 0000000..cb702be --- /dev/null +++ b/templates/zoneconf.epp @@ -0,0 +1,20 @@ +<%- | String $zone, + String $type, + String $update_policy, + | -%> +<%# one zone entry for the bind9 configuration file %> +zone "<%= $zone %>" { + type <%= $type %>; + file "zones/<%= $zone %>.db"; + + <%- if $type == 'master' or $type == 'slave' { %> + journal "journal/<%= $zone %>.jnl"; + <%- } %> + + + <%- if $update_policy { %> + update-policy { + <%= $update_policy %>; + }; + <%- } %> +}; |