]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/bacula/manifests/client.pp
add wilder to bacula
[dsa-puppet.git] / modules / bacula / manifests / client.pp
1 class bacula::client inherits bacula {
2         @@bacula::storage-per-node { $::fqdn: }
3
4         if $::hostname in [beethoven, berlioz, biber, diabelli, dinis, draghi, geo3, schumann, soler, widor, wilder, wolkenstein] {
5                 @@bacula::node { $::fqdn: }
6         }
7
8         package { ['bacula-fd']:
9                 ensure => installed
10         }
11
12         service { 'bacula-fd':
13                 ensure    => running,
14                 enable    => true,
15                 hasstatus => true,
16                 require   => Package['bacula-fd']
17         }
18
19         file {
20                 '/etc/bacula/bacula-fd.conf':
21                         content => template('bacula/bacula-fd.conf.erb'),
22                         mode    => '0640',
23                         owner   => root,
24                         group   => bacula,
25                         require => Package['bacula-fd'],
26                         notify  => Service['bacula-fd'],
27                         ;
28                 '/usr/local/sbin/postbaculajob':
29                         mode    => '0775',
30                         source  => 'puppet:///modules/bacula/postbaculajob',
31                         ;
32                 '/etc/default/bacula-fd':
33                         content => template('bacula/default.bacula-fd.erb'),
34                         mode    => '0400',
35                         owner   => root,
36                         group   => root,
37                         require => Package['bacula-fd'],
38                         notify  => Service['bacula-fd'],
39                         ;
40                 '/etc/apt/preferences.d/dsa-bacula-client':
41                         content => template('bacula/apt.preferences.bacula-client.erb'),
42                         mode    => '0444',
43                         owner   => root,
44                         group   => root,
45                         ;
46
47         }
48
49         @ferm::rule { 'dsa-bacula-fd-v4':
50                 domain      => '(ip)',
51                 description => 'Allow bacula access from storage and director',
52                 rule        => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip}) ACCEPT",
53         }
54
55         #@ferm::rule { 'dsa-bacula-fd-v6':
56         #       domain      => '(ip6)',
57         #       description => 'Allow bacula access from storage and director',
58         #       rule        => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip6}) ACCEPT",
59         #}
60 }