#
# @param director_name bacula name of the dir instance
# @param director_address address of this dir instance that other instances should connect to (dns name)
+# @param messages_name name of the Messages Resource
define bacula::client::director(
String $director_name,
Stdlib::Host $director_address,
+ String $messages_name = "Msg-${director_address}", # XXX remove default
) {
include bacula::client
# @param db_sslca SSL CA store for DB access
# @param director_name bacula name of this dir instance
# @param director_address address of this dir instance that other instances should connect to (dns name)
+# @param messages_name name of the Messages Resource
class bacula::director(
String $db_address,
Integer $db_port,
Optional[String] $db_sslca = undef,
String $director_name = "${::fqdn}-dir",
Stdlib::Host $director_address = $::fqdn,
+ String $messages_name = "Msg-${::fqdn}",
) inherits bacula {
# used by e.g. bconsole
tag => 'bacula::to-storage',
director_name => $director_name,
director_address => $director_address,
+ messages_name => $messages_name,
}
# let FDs know we exist
@@bacula::client::director{ $::fqdn:
tag => "bacula::to-fd::${director_address}",
director_name => $director_name,
director_address => $director_address,
+ messages_name => $messages_name,
}
ensure_packages ( [
#
# @param director_name bacula name of the dir instance
# @param director_address address of this dir instance that other instances should connect to (dns name)
+# @param messages_name name of the Messages Resource
define bacula::storage::director(
String $director_name,
Stdlib::Host $director_address,
+ String $messages_name = "Msg-${director_address}", # XXX remove default
) {
include bacula::storage
# Message delivery #
########################################################################
Messages {
- Name = Standard
+ Name = <%= @messages_name %>
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
#mail on error = <%= @bacula_operator_email %> = all, !skipped
Level = Incremental
FileSet = "Standard Set"
Accurate = yes
- Messages = Standard
+ Messages = <%= @messages_name %>
Max Full Interval = 50 days
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
FileSet = "Standard Set"
Client = <%= @some_client_name%>
Pool = <%= @some_pool_name %>
- Messages = Standard
+ Messages = <%= @messages_name %>
Where = /var/tmp/bacula-restores
}
# Send all messages except skipped files back to Director
Messages {
- Name = Msg-<%= scope['bacula::client::client_name'] %>-<%= @director_name %>
+ Name = <%= @messages_name %>
director = <%= @director_name %> = all, !skipped, !restored
}
# Send all messages to the Director,
#
Messages {
- Name = Standard
+ Name = <%= @messages_name %>
director = <%= @director_name %> = all
}