- '2a01:3f0:0:28::25'
# bacula
#
-bacula::operator_email: 'bacula-reports@admin.debian.org'
+bacula::email_all: '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'
notify => Exec['bacula-director reload']
}
- Bacula::Director::Client <<| tag == "bacula::to-director::${::fqdn}" |>>
Bacula::Director::Client_from_storage<<| tag == "bacula::to-director::${::fqdn}" |>>
+ Bacula::Director::Client <<| tag == "bacula::to-director::${::fqdn}" |>>
package { 'bacula-console':
ensure => installed;
# bacula::director::client and it needs to match.
$pool_name = "${bacula::director::pool_name}-${client}"
- file { "/etc/bacula/conf.d/${client}.conf":
- content => template('bacula/director/dir-per-client.erb'),
- mode => '0440',
- group => bacula,
- notify => Exec['bacula-director reload']
+ if defined(File["/etc/bacula/conf.d/${client}_storage.conf"]) {
+ # this config is only valid if the pools defined in ${client}_storage exist.
+ file { "/etc/bacula/conf.d/${client}.conf":
+ content => template('bacula/director/dir-per-client.erb'),
+ mode => '0440',
+ group => bacula,
+ notify => Exec['bacula-director reload']
+ }
}
}
# @param ssl_client_key path to TLS client certificate key
# @param ssl_server_cert path to TLS server certificate
# @param ssl_server_key path to TLS server certificate key
-# @param operator_email email address for reports
+# @param email_all email address for all reports
+# @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_cert,
String $ssl_server_key,
- String $operator_email = 'root@localhost',
+ Optional[String] $email_all = undef,
+ # default to all if defined, otherwise default to 'root' to enforce error delivery
+ String $email_error = $email_all ? { undef => 'root', default => $email_all },
+ 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 },
########################################################################
Messages {
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 = <%= @operator_email %> = all
- operator = <%= @operator_email %> = mount
+ mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula: %t %e of %c %l\" %r"
+ operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula: Intervention needed for %j\" %r"
+<% if @email_all %>
+ mail = <%= @email_all %> = all
+<% end %>
+<% if @email_error != @email_all %>
+ mail on error = <%= @email_error %> = all
+<% end %>
+ operator = <%= @email_operator %> = mount
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
- mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
- mail = <%= @operator_email %> = all
+ mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula daemon message\" %r"
+ mail = <%= @email_daemon %> = all
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
target_user => 'puppet',
collect_tag => 'puppetmaster',
}
+
+ # we have installed a newer libtrapperkeeper-webserver-jetty9-clojure,
+ # cf. Debian#924005, Debian#930562
+ if versioncmp(Timestamp().strftime('%F'), '2019-12-01') <= 0 {
+ $ensure = versioncmp($::operatingsystemrelease, '10.1') <= 0 ? {
+ true => 'present',
+ default => 'absent',
+ }
+ file { '/etc/nagios/obsolete-packages-ignore.d/libtrapperkeeper-webserver-jetty9-clojure':
+ ensure => $ensure,
+ content => "libtrapperkeeper-webserver-jetty9-clojure\n",
+ }
+ } elsif versioncmp(Timestamp().strftime('%F'), '2020-02-01') <= 0 {
+ notify {'Temporary ignore rule expired, package should be in the archive':
+ loglevel => warning, }
+ } else {
+ fail('Clean up roles::puppetmaster')
+ }
}