Split up mail roles
[mirror/dsa-puppet.git] / modules / bacula / manifests / init.pp
index dfbc9ce..90e42af 100644 (file)
@@ -5,7 +5,10 @@
 # @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
@@ -16,7 +19,10 @@ class bacula (
   String $ssl_server_cert,
   String $ssl_server_key,
 
-  String $operator_email                       = 'root@localhost',
+  Optional[String] $email_all = 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 },