]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/bacula/manifests/storage.pp
f0a09df7a84b509b8a693e0df1e123ed476cf773
[dsa-puppet.git] / modules / bacula / manifests / storage.pp
1 class bacula::storage inherits bacula {
2
3   package {
4     "bacula-sd": ensure => installed;
5   }
6
7   service {
8     "bacula-sd":
9       ensure => running,
10       enable => true,
11       hasstatus => true,
12       ;
13   }
14   file {
15     "/etc/bacula/bacula-sd.conf":
16       content => template("bacula/bacula-sd.conf.erb"),
17       mode => 640,
18       group => bacula,
19       notify  => Exec["bacula-sd restart"]
20       ;
21   }
22
23   exec {
24     "bacula-sd restart":
25       path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
26       refreshonly => true;
27   }
28
29   @ferm::rule { 'dsa-bacula-sd-v4':
30     domain      => '(ip)',
31     description => 'Allow bacula-sd access from director and clients',
32     rule         => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V4) ACCEPT; }',
33     notarule        => true,
34   }
35
36   @ferm::rule { 'dsa-bacula-sd-v6':
37     domain      => '(ip6)',
38     description => 'Allow bacula-sd access from director and clients',
39     rule         => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V6) ACCEPT; }',
40     notarule        => true,
41   }
42 }