Puppet Function: pontoon::service_names_public
- Defined in:
- modules/pontoon/functions/service_names_public.pp
- Function type:
- Puppet Language
Summary
XXXXOverview
SPDX-License-Identifier: Apache-2.0
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'modules/pontoon/functions/service_names_public.pp', line 5
function pontoon::service_names_public(
Hash[String, Wmflib::Service] $services_config,
String $domain,
) >> Hash[String, Array[String]] {
$t = $services_config.map |$service_name, $config| {
$main_name = ('public_endpoint' in $config) ? {
true => ["${config['public_endpoint']}.${domain}"],
false => [],
}
$aliases = ('public_aliases' in $config) ? {
true => $config['public_aliases'].map |$a| { "${a}.${domain}" },
false => [],
}
[
$service_name,
($main_name + $aliases).flatten().sort(),
]
}
Hash($t)
}
|