aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bind
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-13 18:12:24 +0000
committerMichael Scherer <misc@mageia.org>2011-01-13 18:12:24 +0000
commit960966289de4dcf7110468cf5b7ee6f7275c7161 (patch)
treec068e489a7e92261582ab291bbfea51d48061f37 /modules/bind
parent94d4e39055208a57063a244fa1181bd7813d7cf6 (diff)
downloadpuppet-960966289de4dcf7110468cf5b7ee6f7275c7161.tar
puppet-960966289de4dcf7110468cf5b7ee6f7275c7161.tar.gz
puppet-960966289de4dcf7110468cf5b7ee6f7275c7161.tar.bz2
puppet-960966289de4dcf7110468cf5b7ee6f7275c7161.tar.xz
puppet-960966289de4dcf7110468cf5b7ee6f7275c7161.zip
- allow to override the templates used for zone
Diffstat (limited to 'modules/bind')
-rw-r--r--modules/bind/manifests/init.pp31
1 files changed, 19 insertions, 12 deletions
diff --git a/modules/bind/manifests/init.pp b/modules/bind/manifests/init.pp
index 1215d737..0bc9dc87 100644
--- a/modules/bind/manifests/init.pp
+++ b/modules/bind/manifests/init.pp
@@ -30,30 +30,37 @@ class bind {
notify => [Service['named']]
}
- define zone_master {
- file { "/var/lib/named/var/named/master/$name.zone":
+ define zone_base($content = false) {
+ if ! $content {
+ $zone_content = template("bind/zones/$name.zone")
+ } else {
+ $zone_content = $content
+ }
+ file { "/var/lib/named/var/named/$zone_subdir/$name.zone":
ensure => present,
owner => root,
group => root,
mode => 644,
- content => template("bind/zones/$name.zone"),
+ content => $zone_content,
require => Package[bind],
notify => Service[named]
}
}
- define zone_reverse {
- file { "/var/lib/named/var/named/reverse/$name.zone":
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("bind/zones/$name.zone"),
- require => Package[bind],
- notify => Service[named]
+ define zone_master(content = false) {
+ $zone_subdir = "master"
+ zone_base { $name :
+ content => $content
}
}
+ define zone_reverse(content = false) {
+ $zone_subdir = "reverse"
+ zone_base { $name :
+ content => $content
+ }
+ }
+
class bind_master inherits bind_base {
file { '/var/lib/named/etc/named.conf':