1 class bacula::storage inherits bacula {
11 dsa_systemd::override { 'bacula-sd':
15 SupplementaryGroups=ssl-cert
19 exec { 'bacula-sd restart-when-idle':
20 path => '/usr/bin:/usr/sbin:/bin:/sbin',
21 command => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart sd &"',
23 subscribe => File[$bacula_ssl_server_cert],
24 require => File['/usr/local/sbin/bacula-idle-restart'],
28 file { '/etc/bacula/bacula-sd.conf':
29 content => template('bacula/bacula-sd.conf.erb'),
32 notify => Exec['bacula-sd restart-when-idle']
35 file { '/etc/bacula/storage-conf.d':
42 source => 'puppet:///files/empty/',
43 notify => Exec['bacula-sd restart-when-idle']
46 ferm::rule { 'dsa-bacula-sd-v4':
48 description => 'Allow bacula-sd access from director and clients',
49 rule => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V4 5.153.231.125 5.153.231.126) ACCEPT; }',
53 ferm::rule { 'dsa-bacula-sd-v6':
55 description => 'Allow bacula-sd access from director and clients',
56 rule => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V6) ACCEPT; }',
60 file { '/etc/bacula/storage-conf.d/empty.conf':
64 notify => Exec['bacula-sd restart-when-idle']
67 file { "${bacula_backup_path}/Catalog":
75 package { 'python3-psycopg2': ensure => installed }
76 file { '/usr/local/bin/bacula-unlink-removed-volumes':
77 source => 'puppet:///modules/bacula/bacula-unlink-removed-volumes',
80 file { "/etc/cron.d/puppet-bacula-storage-stuff": ensure => absent, }
81 concat::fragment { 'dsa-puppet-stuff--bacula-storage':
82 target => '/etc/cron.d/dsa-puppet-stuff',
84 @daily bacula chronic /usr/local/bin/bacula-unlink-removed-volumes -v
88 Bacula::Storage_per_node<<| |>>