]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Add storage daemon class
authorTollef Fog Heen <tfheen@err.no>
Sat, 16 Jun 2012 10:13:17 +0000 (12:13 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sat, 16 Jun 2012 10:13:44 +0000 (12:13 +0200)
modules/bacula/manifests/storage.pp [new file with mode: 0644]

diff --git a/modules/bacula/manifests/storage.pp b/modules/bacula/manifests/storage.pp
new file mode 100644 (file)
index 0000000..377ecbc
--- /dev/null
@@ -0,0 +1,30 @@
+class bacula::storage inherits bacula {
+
+  package {
+    "bacula-sd": ensure => installed;
+    "bacula-sd-pgsql": ensure => installed;
+  }
+
+  service {
+    "bacula-sd":
+      ensure => running,
+      enable => true,
+      hasstatus => true,
+      require => Package["bacula-sd-pgsql"];
+  }
+  file {
+    "/etc/bacula/bacula-sd.conf":
+      content => template("bacula/bacula-sd.conf.erb"),
+      mode => 640,
+      group => bacula,
+      require => Package["bacula-sd-pgsql"],
+      notify  => Exec["bacula-sd restart"]
+      ;
+  }
+
+  exec {
+    "bacula-sd restart":
+      path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+      refreshonly => true;
+  }
+}