Initialize zone files for non-forward zones
This commit is contained in:
parent
a4d78368b3
commit
d2b830a2e9
9
files/db.empty
Normal file
9
files/db.empty
Normal file
@ -0,0 +1,9 @@
|
||||
$TTL 86400
|
||||
@ IN SOA localhost. root.localhost. (
|
||||
1 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
86400 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS localhost.
|
||||
@ -11,7 +11,22 @@ define bind::zone (
|
||||
$_domain = $domain
|
||||
}
|
||||
|
||||
$file = "${bind::confdir}/zones/${name}.zone"
|
||||
case $zone_type {
|
||||
'forward': {
|
||||
$file = ''
|
||||
}
|
||||
default: {
|
||||
$file = "${bind::confdir}/zones/${name}.zone"
|
||||
file { $file:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => ${bind::params::bind_group},
|
||||
mode => '0644',
|
||||
replace => false,
|
||||
source => 'puppet:///modules/bind/db.empty',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file { "${bind::confdir}/zones/${name}.conf":
|
||||
ensure => present,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user