summaryrefslogtreecommitdiff
path: root/manifests/classes/bind.pp
blob: 67bb0e05c72b51b5e5cb4a400d2419e1af23cfef (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*

= Class: bind
Include this class to install bind9 server on your node.

Requires:
- module common (git://github.com/camptocamp/puppet-common.git)

Example:

node "ns1.domain.ltd" {
  include bind

= Class: bind
Include this class to install bind9 server on your node.

Requires:
- module common (git://github.com/camptocamp/puppet-common.git)

Bind documentation:
http://www.bind9.net/manuals

Limitations:
This modules is valid for Bind 9.7.1 (squeeze version).
For 9.7.2, it will be really limited (no view nor ACL support).


Example:

node "ns1.domain.ltd" {
  include bind
  bind::zone {"domain.ltd":
    ensure => present,
    zone_contact => "contact.domain.ltd",
    zone_ns      => $fqdn,
    zone_serial  => "2010110804",
    zone_ttl     => "604800",
  }

  bind::a {"ns $fqdn":
    zone  => "domain.ltd",
    owner => "${fqdn}.",
    host  => $ipaddress,
  }

  bind::a {"mail.domain.ltd":
    zone  => "domain.ltd",
    owner => "mail",
    host  => "6.6.6.6",
  }

  bind::mx {"mx1":
    zone     => "domain.ltd",
    owner    => "@",
    priority => 1,
    host     => "mail.domain.ltd",
  }
}
*/
class bind {
  case $operatingsystem {
    "Debian": { include bind::debian }
    default: { fail "Unknown $operatingsystem" }
  }
}