String $bacula_storage_address = 'storace.debian.org',
Integer $bacula_storage_port = 9103,
- String $bacula_backup_path = '/srv/bacula',
-
String $bacula_director_secret = hkdf('/etc/puppet/secret', "bacula-dir-${::hostname}"),
String $bacula_db_secret = hkdf('/etc/puppet/secret', "bacula-db-${::hostname}"),
String $bacula_storage_secret = hkdf('/etc/puppet/secret', "bacula-sd-${bacula_storage_name}"),
# the bacula storage node
-class bacula::storage inherits bacula {
+#
+# @param backup_path the directory where backups should be stored
+class bacula::storage (
+ String $backup_path = '/srv/bacula',
+) inherits bacula {
package { 'bacula-sd':
ensure => installed
}
# bacula storage for node. This is stored config by a client, collected on the storage
define bacula::storage_per_node() {
-
- include bacula
+ include bacula::storage
$bacula_filestor_device = $bacula::bacula_filestor_device
$bacula_filestor_name = $bacula::bacula_filestor_name
- $bacula_backup_path = $bacula::bacula_backup_path
$bacula_client_name = "${name}-fd"
$client = $name
group => bacula,
notify => Exec['bacula-sd restart-when-idle'],
;
- "${bacula_backup_path}/${name}":
+ "${bacula::storage::backup_path}/${name}":
ensure => directory,
mode => '0755',
owner => bacula,
Device {
Name = "<%= @bacula_filestor_device %>-<%= @client %>"
Media Type = "<%= @bacula_filestor_name %>-<%= @client %>"
- Archive Device = "<%= @bacula_backup_path %>/<%= @client %>"
+ Archive Device = "<%= scope['bacula::storage::backup_path'] %>/<%= @client %>"
LabelMedia = yes;
Random Access = Yes;
AutomaticMount = yes;