# bacula
#
bacula::email_all: 'bacula-reports@admin.debian.org'
+bacula::email_error: 'bacula-reports@admin.debian.org'
bacula::ssl_ca_path: '/etc/ssl/debian/certs/ca.crt'
bacula::ssl_client_cert: '/etc/ssl/debian/certs/thishost.crt'
bacula::ssl_client_key: '/etc/ssl/private/thishost.key'
$some_pool_name = "poolfull-${pool_name}-${director_address}"
$some_client_name = "${director_address}-fd"
- $real_email_error = $bacula::email_error ? { true => $bacula::email_error , default => 'root@localhost' }
- $real_email_operator = $bacula::email_operator ? { true => $bacula::email_operator, default => 'root@localhost' }
- $real_email_daemon = $bacula::email_daemon ? { true => $bacula::email_daemon , default => 'root@localhost' }
-
# let the SD know we exist
@@bacula::storage::director{ $::fqdn:
tag => 'bacula::to-storage',
# @param ssl_server_cert path to TLS server certificate
# @param ssl_server_key path to TLS server certificate key
# @param email_all email address for all reports
-# @param email_error email address for errors (defaults to root@localhost)
-# @param email_operator email address for the operator (to mount tapes etc; defaults to root@localhost)
-# @param email_daemon email address for messages from the daemon (defaults to root@localhost)
+# @param email_error email address for errors
+# @param email_operator email address for the operator (to mount tapes etc)
+# @param email_daemon email address for messages from the daemon
# @param public_addresses this host's public IP addresses. The ones it connects out from and is reachable from outsite.
# @param has_ipv4 daemons should listen on ipv4
# @param has_ipv6 daemons should listen on ipv6
String $ssl_server_key,
Optional[String] $email_all = undef,
- Optional[String] $email_error = undef,
- Optional[String] $email_operator = undef,
- Optional[String] $email_daemon = undef,
+ String $email_error = $email_all ? { true => $email_all, default => 'root@localhost' },
+ String $email_operator = $email_error,
+ String $email_daemon = $email_error,
Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses,
Boolean $has_ipv4 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V4 },
Boolean $has_ipv6 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V6 },
<% if @email_all %>
mail = <%= @email_all %> = all
<% end %>
-<% if @real_email_error != @email_all %>
- mail on error = <%= @real_email_error %> = all
+<% if @email_error != @email_all %>
+ mail on error = <%= @email_error %> = all
<% end %>
- operator = <%= @real_email_operator %> = mount
+ operator = <%= @email_operator %> = mount
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
- mail = <%= @real_email_daemon %> = all
+ mail = <%= @email_daemon %> = all
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all