From 48f0a1e156bfe574321f865a90fa9530b4952783 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 27 Oct 2010 00:14:45 +0000 Subject: - fix syntax --- modules/bind/manifests/init.pp | 67 ++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'modules/bind') diff --git a/modules/bind/manifests/init.pp b/modules/bind/manifests/init.pp index 38716b9d..20ab7b1c 100644 --- a/modules/bind/manifests/init.pp +++ b/modules/bind/manifests/init.pp @@ -1,45 +1,48 @@ -package { bind: - ensure => installed -} - -service { named: - ensure => running, - path => "/etc/init.d/named", - subscribe => [ Package["bind"]] -} +class bind { + class bind_base { + package { bind: + ensure => installed + } -file { '/etc/named.conf': - ensure => present, - owner => root, - group => root, - mode => 644, - require => Package["bind"], - content => "", - notify => [Service['named']] -} + service { named: + ensure => running, + path => "/etc/init.d/named", + subscribe => [ Package["bind"]] + } + } -define zone_master { - file { "/var/lib/named/var/named/master/$name.zone": + file { '/etc/named.conf': ensure => present, owner => root, group => root, mode => 644, - content => template("bind/zones/$name.zone"), - require => Package[bind], - notify => Service[named] + require => Package["bind"], + content => "", + notify => [Service['named']] } -} -class bind_master inherits bind_base { - file { '/etc/named.conf': - content => template("bind/named_base.conf", "bind/named_master.conf"), + define zone_master { + file { "/var/lib/named/var/named/master/$name.zone": + ensure => present, + owner => root, + group => root, + mode => 644, + content => template("bind/zones/$name.zone"), + require => Package[bind], + notify => Service[named] + } } -} -class bind_slave inherits bind_base { - file { '/etc/named.conf': - content => template("bind/named_base.conf", "bind/named_slave.conf"), + class bind_master inherits bind_base { + file { '/etc/named.conf': + content => template("bind/named_base.conf", "bind/named_master.conf"), + } } -} + class bind_slave inherits bind_base { + file { '/etc/named.conf': + content => template("bind/named_base.conf", "bind/named_slave.conf"), + } + } +} -- cgit v1.2.1