aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bind/manifests/init.pp
blob: 38716b9d8eaf80a6a412fc69614cdb9a0a82f67e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package { bind:
    ensure => installed
}

service { named:
    ensure => running,
    path => "/etc/init.d/named",
    subscribe => [ Package["bind"]]
}

file { '/etc/named.conf':
    ensure => present,
    owner => root,
    group => root,
    mode => 644,
    require => Package["bind"],
    content => "",
    notify => [Service['named']]
}

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_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"),
    }
}