X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Fstorage.pp;h=1e538bf17cd1f158cf00bc6d731cd5e55d6a6832;hb=3661675fcab6a1dab09910456c98f19aaa50b395;hp=ed3bbfd92f9844c2298aae064a77b6993d1e4418;hpb=010327a6ed81f5aa701a3830ea6bda19777dd3a4;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/storage.pp b/modules/bacula/manifests/storage.pp index ed3bbfd92..1e538bf17 100644 --- a/modules/bacula/manifests/storage.pp +++ b/modules/bacula/manifests/storage.pp @@ -9,6 +9,13 @@ class bacula::storage inherits bacula { enable => true, hasstatus => true, } + systemd::override { 'bacula-sd': + content => @(EOT) + [Service] + Group=bacula + SupplementaryGroups=ssl-cert + | EOT + } exec { 'bacula-sd restart-when-idle': path => '/usr/bin:/usr/sbin:/bin:/sbin', @@ -40,7 +47,7 @@ class bacula::storage inherits bacula { @ferm::rule { 'dsa-bacula-sd-v4': domain => '(ip)', description => 'Allow bacula-sd access from director and clients', - rule => 'proto tcp mod state state (NEW) dport (bacula-sd) @subchain \'bacula-sd\' { saddr ($HOST_DEBIAN_V4) ACCEPT; }', + 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; }', notarule => true, } @@ -58,6 +65,26 @@ class bacula::storage inherits bacula { notify => Exec['bacula-sd restart-when-idle'] } - Bacula::Storage-per-Node<<| |>> + file { "${bacula_backup_path}/Catalog": + ensure => directory, + mode => '0755', + owner => bacula, + group => bacula, + ; + } + + package { 'python3-psycopg2': ensure => installed } + file { '/usr/local/bin/bacula-unlink-removed-volumes': + source => 'puppet:///modules/bacula/bacula-unlink-removed-volumes', + mode => '0555', + } + file { "/etc/cron.d/puppet-bacula-storage-stuff": ensure => absent, } + concat::fragment { 'dsa-puppet-stuff--bacula-storage': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @(EOF) + @daily bacula chronic /usr/local/bin/bacula-unlink-removed-volumes -v + | EOF + } + Bacula::Storage_per_node<<| |>> }