Add a zone definition
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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'),
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user