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