Add templates for named.conf and for view fragments

This commit is contained in:
Nate Riffe
2012-09-03 21:52:38 -05:00
parent 641d416c97
commit 594d850cb2
4 changed files with 49 additions and 7 deletions
+10 -7
View File
@@ -1,4 +1,5 @@
class bind (
$confdir = $bind::params::confdir,
) {
include bind::params
@@ -14,10 +15,18 @@ class bind (
require => Package[$bind::params::bind_package],
}
file { "${bind::params::confdir}/named.conf":
ensure => present,
owner => $bind::params::bind_user,
group => $bind::params::bind_group,
mode => '0644',
content => template('bind/named.conf.erb'),
notify => Service[$bind::params::bind_service],
}
concat { [
"${bind::params::confdir}/acls.conf",
"${bind::params::confdir}/views.conf",
"${bind::params::confdir}/zones.conf",
]:
owner => $bind::params::bind_user,
group => $bind::params::bind_group,
@@ -36,10 +45,4 @@ class bind (
target => "${bind::params::confdir}/views.conf",
content => "# This file is managed by puppet - changes will be lost\n",
}
concat::fragment { "named-zones-header":
order => '00',
target => "${bind::params::confdir}/zones.conf",
content => "# This file is managed by puppet - changes will be lost\n",
}
}
+14
View File
@@ -0,0 +1,14 @@
define bind::view (
$match_clients = [ 'any' ],
$match_destinations = [],
$zones = [],
$recursion = true,
) {
$confdir = $bind::params::confdir
concat::fragment { "bind-view-${name}":
order = '10',
target = "${bind::params::confdir}/views.conf",
content = template('bind/view.erb'),
}
}