Add a zone definition

This commit is contained in:
Nate Riffe
2012-09-04 07:24:31 -05:00
parent 6800ca9ebc
commit 63b3c4037b
3 changed files with 58 additions and 0 deletions
+7
View File
@@ -23,6 +23,13 @@ class bind (
notify => Service[$bind::params::bind_service],
}
file { "${confdir}/zones":
ensure => directory,
owner => $bind::params::bind_user,
group => $bind::params::bind_group,
mode => '0755',
}
concat { [
"${bind::params::confdir}/acls.conf",
"${bind::params::confdir}/views.conf",
+22
View File
@@ -0,0 +1,22 @@
define bind::zone (
$type,
$domain = '',
$masters = [],
$allow_updates = [],
$allow_transfers = [],
) {
if $domain == ''
$_domain = $name
else
$_domain = $domain
fi
file { "${bind::params::confdir}/zones/${name}.conf":
ensure => present,
owner => ${bind::params::bind_user},
group => ${bind::params::bind_group},
mode => '0644',
content => template('bind/zone.conf.erb'),
}
}