aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bind/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bind/manifests/init.pp')
-rw-r--r--modules/bind/manifests/init.pp45
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/bind/manifests/init.pp b/modules/bind/manifests/init.pp
new file mode 100644
index 00000000..38716b9d
--- /dev/null
+++ b/modules/bind/manifests/init.pp
@@ -0,0 +1,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"),
+ }
+}
+
+