simplify email_error default logic
authorPeter Palfrader <peter@palfrader.org>
Wed, 25 Sep 2019 20:27:38 +0000 (22:27 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 25 Sep 2019 20:27:38 +0000 (22:27 +0200)
(by anarcat)

modules/bacula/manifests/init.pp

index cf83a26..02cf506 100644 (file)
@@ -20,7 +20,8 @@ class bacula (
   String $ssl_server_key,
 
   Optional[String] $email_all = undef,
-  String $email_error                          = $email_all != undef ? { true => $email_all, default => 'root@localhost' },
+  # 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,