/[adm]/puppet/modules/bind/manifests/init.pp
ViewVC logotype

Diff of /puppet/modules/bind/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29 by misc, Tue Oct 26 23:54:17 2010 UTC revision 30 by misc, Wed Oct 27 00:14:45 2010 UTC
# Line 1  Line 1 
1  package { bind:  class bind {
2      ensure => installed      class bind_base {
3  }          package { bind:
4                ensure => installed
5  service { named:          }
6      ensure => running,  
7      path => "/etc/init.d/named",          service { named:
8      subscribe => [ Package["bind"]]              ensure => running,
9  }              path => "/etc/init.d/named",
10                subscribe => [ Package["bind"]]
11  file { '/etc/named.conf':          }
12      ensure => present,      }
     owner => root,  
     group => root,  
     mode => 644,  
     require => Package["bind"],  
     content => "",  
     notify => [Service['named']]  
 }  
13    
14  define zone_master {      file { '/etc/named.conf':
     file { "/var/lib/named/var/named/master/$name.zone":  
15          ensure => present,          ensure => present,
16          owner => root,          owner => root,
17          group => root,          group => root,
18          mode => 644,          mode => 644,
19          content => template("bind/zones/$name.zone"),          require => Package["bind"],
20          require => Package[bind],          content => "",
21          notify => Service[named]          notify => [Service['named']]
22      }      }
 }  
23    
24  class bind_master inherits bind_base {      define zone_master {
25      file { '/etc/named.conf':          file { "/var/lib/named/var/named/master/$name.zone":
26          content => template("bind/named_base.conf", "bind/named_master.conf"),              ensure => present,
27                owner => root,
28                group => root,
29                mode => 644,
30                content => template("bind/zones/$name.zone"),
31                require => Package[bind],
32                notify => Service[named]
33            }
34      }      }
 }  
35    
36  class bind_slave inherits bind_base {      class bind_master inherits bind_base {
37      file { '/etc/named.conf':          file { '/etc/named.conf':
38          content => template("bind/named_base.conf", "bind/named_slave.conf"),              content => template("bind/named_base.conf", "bind/named_master.conf"),
39            }
40      }      }
 }  
41    
42        class bind_slave inherits bind_base {
43            file { '/etc/named.conf':
44                content => template("bind/named_base.conf", "bind/named_slave.conf"),
45            }
46        }
47    
48    }

Legend:
Removed from v.29  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.30