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 |
|
|
} |
13 |
misc |
27 |
|
14 |
misc |
30 |
file { '/etc/named.conf': |
15 |
misc |
27 |
ensure => present, |
16 |
|
|
owner => root, |
17 |
|
|
group => root, |
18 |
|
|
mode => 644, |
19 |
misc |
30 |
require => Package["bind"], |
20 |
|
|
content => "", |
21 |
|
|
notify => [Service['named']] |
22 |
misc |
27 |
} |
23 |
|
|
|
24 |
misc |
30 |
define zone_master { |
25 |
|
|
file { "/var/lib/named/var/named/master/$name.zone": |
26 |
|
|
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 |
misc |
27 |
} |
35 |
|
|
|
36 |
misc |
30 |
class bind_master inherits bind_base { |
37 |
|
|
file { '/etc/named.conf': |
38 |
|
|
content => template("bind/named_base.conf", "bind/named_master.conf"), |
39 |
|
|
} |
40 |
misc |
27 |
} |
41 |
|
|
|
42 |
misc |
30 |
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 |
misc |
27 |
|
48 |
misc |
30 |
} |