Initialize zone files for non-forward zones

This commit is contained in:
Nate Riffe 2012-09-04 22:53:10 -05:00
parent a4d78368b3
commit d2b830a2e9
2 changed files with 25 additions and 1 deletions

9
files/db.empty Normal file
View 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.

View File

@ -11,7 +11,22 @@ define bind::zone (
$_domain = $domain $_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": file { "${bind::confdir}/zones/${name}.conf":
ensure => present, ensure => present,