1 class bacula::storage inherits bacula {
12 systemd::override { 'bacula-sd':
16 SupplementaryGroups=ssl-cert
20 exec { 'bacula-sd restart-when-idle':
21 path => '/usr/bin:/usr/sbin:/bin:/sbin',
22 command => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart sd &"',
24 subscribe => File[$bacula_ssl_server_cert],
25 require => File['/usr/local/sbin/bacula-idle-restart'],
29 file { '/etc/bacula/bacula-sd.conf':
30 content => template('bacula/bacula-sd.conf.erb'),
33 notify => Exec['bacula-sd restart-when-idle']
36 file { '/etc/bacula/storage-conf.d':
43 source => 'puppet:///files/empty/',
44 notify => Exec['bacula-sd restart-when-idle']
47 @ferm::rule { 'dsa-bacula-sd-v4':
49 description => 'Allow bacula-sd access from director and clients',
50 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; }',
54 @ferm::rule { 'dsa-bacula-sd-v6':
56 description => 'Allow bacula-sd access from director and clients',
57 rule => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V6) ACCEPT; }',
61 file { '/etc/bacula/storage-conf.d/empty.conf':
65 notify => Exec['bacula-sd restart-when-idle']
68 file { "${bacula_backup_path}/Catalog":
76 package { 'python3-psycopg2': ensure => installed }
77 file { '/usr/local/bin/bacula-unlink-removed-volumes':
78 source => 'puppet:///modules/bacula/bacula-unlink-removed-volumes',
81 file { "/etc/cron.d/puppet-bacula-storage-stuff": ensure => absent, }
82 concat::fragment { 'dsa-puppet-stuff--bacula-storage':
83 target => '/etc/cron.d/dsa-puppet-stuff',
85 @daily bacula chronic /usr/local/bin/bacula-unlink-removed-volumes -v
89 Bacula::Storage_per_node<<| |>>