]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/bacula/manifests/client.pp
get rid of bacula pinning on wheezy
[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, kaufmann, lully, master, new-master, reger, schumann, soler, vento, vieuxtemps, 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 { '/etc/bacula/bacula-fd.conf':
20                 content => template('bacula/bacula-fd.conf.erb'),
21                 mode    => '0640',
22                 owner   => root,
23                 group   => bacula,
24                 require => Package['bacula-fd'],
25                 notify  => Service['bacula-fd'],
26         }
27         file { '/usr/local/sbin/postbaculajob':
28                 mode    => '0775',
29                 source  => 'puppet:///modules/bacula/postbaculajob',
30         }
31         file { '/etc/default/bacula-fd':
32                 content => template('bacula/default.bacula-fd.erb'),
33                 mode    => '0400',
34                 owner   => root,
35                 group   => root,
36                 require => Package['bacula-fd'],
37                 notify  => Service['bacula-fd'],
38         }
39         if $::lsbmajdistrelease < 7 {
40                 file { '/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         } else {
47                 file { '/etc/apt/preferences.d/dsa-bacula-client':
48                         ensure => absent
49                 }
50         }
51
52         @ferm::rule { 'dsa-bacula-fd-v4':
53                 domain      => '(ip)',
54                 description => 'Allow bacula access from storage and director',
55                 rule        => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip}) ACCEPT",
56         }
57
58         #@ferm::rule { 'dsa-bacula-fd-v6':
59         #       domain      => '(ip6)',
60         #       description => 'Allow bacula access from storage and director',
61         #       rule        => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip6}) ACCEPT",
62         #}
63 }