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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1757 - (hide annotations) (download)
Fri Jun 17 10:59:48 2011 UTC (12 years, 10 months ago) by misc
File size: 1911 byte(s)
fix puppetmaster warning about missing $ in prototype
1 misc 30 class bind {
2     class bind_base {
3     package { bind:
4     ensure => installed
5     }
6 misc 27
7 misc 30 service { named:
8     ensure => running,
9     path => "/etc/init.d/named",
10     subscribe => [ Package["bind"]]
11     }
12 misc 40
13     file { '/etc/named.conf':
14     ensure => "/var/lib/named/etc/named.conf",
15     owner => root,
16     group => root,
17 misc 457 mode => 644,
18     require => Package[bind]
19 misc 40 }
20 misc 30 }
21 misc 27
22 misc 40
23     file { '/var/lib/named/etc/named.conf':
24 misc 27 ensure => present,
25     owner => root,
26     group => root,
27     mode => 644,
28 misc 30 require => Package["bind"],
29     content => "",
30     notify => [Service['named']]
31 misc 27 }
32    
33 misc 774 define zone_base($content = false) {
34     if ! $content {
35     $zone_content = template("bind/zones/$name.zone")
36     } else {
37     $zone_content = $content
38     }
39     file { "/var/lib/named/var/named/$zone_subdir/$name.zone":
40 misc 30 ensure => present,
41     owner => root,
42     group => root,
43     mode => 644,
44 misc 774 content => $zone_content,
45 misc 30 require => Package[bind],
46     notify => Service[named]
47     }
48 misc 27 }
49    
50 misc 1757 define zone_master($content = false) {
51 misc 774 $zone_subdir = "master"
52     zone_base { $name :
53     content => $content
54 misc 492 }
55     }
56    
57 misc 1757 define zone_reverse($content = false) {
58 misc 774 $zone_subdir = "reverse"
59     zone_base { $name :
60     content => $content
61     }
62     }
63 misc 492
64 misc 774
65 misc 30 class bind_master inherits bind_base {
66 misc 42 file { '/var/lib/named/etc/named.conf':
67 misc 30 content => template("bind/named_base.conf", "bind/named_master.conf"),
68     }
69 misc 27 }
70    
71 misc 30 class bind_slave inherits bind_base {
72 misc 42 file { '/var/lib/named/etc/named.conf':
73 misc 30 content => template("bind/named_base.conf", "bind/named_slave.conf"),
74     }
75     }
76 misc 27
77 misc 30 }

  ViewVC Help
Powered by ViewVC 1.1.30