From 1cd6b845500d05055a1e291cbdba6fe269254c43 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 25 Sep 2019 22:27:38 +0200 Subject: [PATCH] simplify email_error default logic (by anarcat) --- modules/bacula/manifests/init.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bacula/manifests/init.pp b/modules/bacula/manifests/init.pp index cf83a2689..02cf50615 100644 --- a/modules/bacula/manifests/init.pp +++ b/modules/bacula/manifests/init.pp @@ -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, -- 2.20.1