1 class bacula::client inherits bacula {
2 @@bacula::storage-per-node { $::fqdn: }
4 if ! getfromhash($site::nodeinfo, 'not-bacula-client') {
5 @@bacula::node { $::fqdn:
6 bacula_client_port => $bacula::bacula_client_port,
10 package { ['bacula-fd']:
14 service { 'bacula-fd':
18 require => Package['bacula-fd']
21 exec { 'bacula-fd restart-when-idle':
22 path => '/usr/bin:/usr/sbin:/bin:/sbin',
23 command => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart fd &"',
25 subscribe => [ File[$bacula_ssl_server_cert], File[$bacula_ssl_client_cert] ],
26 require => File['/usr/local/sbin/bacula-idle-restart'],
29 file { '/etc/bacula/bacula-fd.conf':
30 content => template('bacula/bacula-fd.conf.erb'),
34 require => Package['bacula-fd'],
35 notify => Exec['bacula-fd restart-when-idle'],
37 file { '/usr/local/sbin/bacula-backup-dirs':
39 source => 'puppet:///modules/bacula/bacula-backup-dirs',
41 file { '/usr/local/sbin/postbaculajob':
43 source => 'puppet:///modules/bacula/postbaculajob',
45 file { '/etc/default/bacula-fd':
46 content => template('bacula/default.bacula-fd.erb'),
50 require => Package['bacula-fd'],
51 notify => Service['bacula-fd'],
53 if ($::lsbmajdistrelease >= 9 and $systemd) {
54 file { '/etc/systemd/system/bacula-fd.service.d':
60 file { '/etc/systemd/system/bacula-fd.service.d/user.conf':
61 source => 'puppet:///modules/bacula/bacula-fd-systemd',
65 notify => Exec['systemctl daemon-reload'],
68 file { '/etc/systemd/system/bacula-fd.service.d/user.conf':
73 @ferm::rule { 'dsa-bacula-fd-v4':
75 description => 'Allow bacula access from storage and director',
76 rule => "proto tcp mod state state (NEW) dport (${bacula_client_port}) saddr (${bacula_director_ip}) ACCEPT",
79 #@ferm::rule { 'dsa-bacula-fd-v6':
81 # description => 'Allow bacula access from storage and director',
82 # rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip6}) ACCEPT",