]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/bacula/manifests/client.pp
Ensure we get string interpolation for director address
[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':
34     domain      => '(ip ip6)',
35     description => 'Allow bacula access from storage and director',
36     rule        => "proto tcp mod state state (NEW) dport (bacula-fd) @subchain \'bacula\' { saddr ($bacula_director_address) ACCEPT; }",
37   }
38 }