On 04/24/2018 11:22 PM, Henrik Lindberg wrote:

> $contactgroups = [
>   'Windows Server Admins',
> 
>   if 'sql' in $hostname.downcase or $wl_server_type == 'db' {
>     'Microsoft SQL DBAs'
>   },
> 
>   if $wl_app in $btssServers or 'adfs' in $hostname.downcase {
>     'BT Systems Support'
>   },
> 
>   if $wl_app == 'hea' {
>     'HEAT Admins'
>   }
> ].filter |$x| { $x =~ NotUndef }.join(',')

I hadn't seen the answer of Henrik but indeed his code is definitively better 
than my reduce(). ;)

Bye.

-- 
François

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e9ab47d1-dc3f-bafd-434f-704e4c449f73%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to