/[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 2301 by misc, Mon Jan 16 15:52:40 2012 UTC revision 2659 by misc, Tue Mar 20 17:30:29 2012 UTC
# Line 1  Line 1 
1  class bind {  class bind {
2      class bind_base {      class bind_base {
3          package { bind: }          package { 'bind': }
4    
5          service { named:          service { 'named':
6              restart => "service named restart",              restart   => 'service named restart',
7              subscribe => Package["bind"],              subscribe => Package['bind'],
8          }          }
9    
10          file { '/etc/named.conf':          file { '/etc/named.conf':
11              ensure => "/var/lib/named/etc/named.conf",              ensure  => '/var/lib/named/etc/named.conf',
12              require => Package[bind],              require => Package['bind'],
13          }          }
14            
15          exec { "named_reload":          exec { 'named_reload':
16              command => "service named reload",              command     => 'service named reload',
17              refreshonly => true,              refreshonly => true,
18          }          }
19    
20          file { '/var/lib/named/etc/named.conf':          file { '/var/lib/named/etc/named.conf':
21              require => Package["bind"],              require => Package['bind'],
22              content => "",              content => '',
23              notify => Service['named'],              notify  => Service['named'],
24          }          }
25      }      }
26    
# Line 32  class bind { Line 32  class bind {
32          }          }
33          file { "/var/lib/named/var/named/$zone_subdir/$name.zone":          file { "/var/lib/named/var/named/$zone_subdir/$name.zone":
34              content => $zone_content,              content => $zone_content,
35              require => Package[bind],              require => Package['bind'],
36              notify => Exec[named_reload]              notify  => Exec['named_reload']
37          }          }
38      }      }
39    
40      define zone_master($content = false) {      define zone_master($content = false) {
41          $zone_subdir = "master"          $zone_subdir = 'master'
42          zone_base { $name :          zone_base { $name :
43              content => $content              content => $content
44          }          }
45      }      }
46    
47      define zone_reverse($content = false) {      define zone_reverse($content = false) {
48          $zone_subdir = "reverse"          $zone_subdir = 'reverse'
49          zone_base { $name :          zone_base { $name :
50              content => $content              content => $content
51          }          }
52      }      }
53    
54    
# Line 57  class bind { Line 57  class bind {
57    
58          $managed_tlds = list_exported_ressources('Tld_redirections::Domain')          $managed_tlds = list_exported_ressources('Tld_redirections::Domain')
59          File['/var/lib/named/etc/named.conf'] {          File['/var/lib/named/etc/named.conf'] {
60              content => template("bind/named_base.conf", "bind/named_master.conf"),              content => template('bind/named_base.conf', 'bind/named_master.conf'),
61          }          }
62      }      }
63    
64      class bind_slave inherits bind_base {      class bind_slave inherits bind_base {
65          $managed_tlds = list_exported_ressources('Tld_redirections::Domain')          $managed_tlds = list_exported_ressources('Tld_redirections::Domain')
66          File['/var/lib/named/etc/named.conf'] {          File['/var/lib/named/etc/named.conf'] {
67              content => template("bind/named_base.conf", "bind/named_slave.conf"),              content => template('bind/named_base.conf', 'bind/named_slave.conf'),
68          }          }
69      }      }
70  }  }

Legend:
Removed from v.2301  
changed lines
  Added in v.2659

  ViewVC Help
Powered by ViewVC 1.1.30