Project

General

Profile

« Previous | Next » 

Revision 5d340dbb

Added by Ewoud Kohl van Wijngaarden almost 12 years ago

Make the DNS zone more configurable

View differences:

manifests/zone.pp
define dns::zone ($zonetype='master', $soa, $reverse='false', $ttl='10800', $soaip) {
$contact = "root@${name}"
define dns::zone (
$zonetype='master',
$soa='',
$reverse=false,
$ttl='10800',
$soaip='',
$refresh = 86400,
$update_retry = 3600,
$expire = 604800,
$negttl = 3600
) {
$contact = "root.${name}"
$serial = 1
include dns
include dns::params
templates/zone.header.erb
$TTL <%= ttl %>
<%= zone %>. IN SOA <%= soa %>. <%= contact %> (
<%= serial %> ;Serial
86400 ;Refresh
3600 ;Retry
604800 ;Expire
3600 ;Negative caching TTL
)
@ IN SOA <%= soa %>. <%= contact %> (
<%= serial %> ;Serial
<%= refresh %> ;Refresh
<%= update_retry %> ;Retry
<%= expire %> ;Expire
<%= negttl %> ;Negative caching TTL
)
$ORIGIN <%= zone %>.
<%= zone %>. IN NS <%= soa %>.
@ IN NS <%= soa %>.
<% if ! reverse %>
<%= soa %>. IN A <%= soaip %>
<%= soa %>. IN A <%= soaip %>
<% end %>

Also available in: Unified diff