Puppet Function: wmflib::service::get_ips_for_services

Defined in:
modules/wmflib/functions/service/get_ips_for_services.pp
Function type:
Puppet Language

Overview

wmflib::service::get_ips_for_services(Hash[String, Wmflib::Service] $services, String $site)Array[Stdlib::Ip_address]

Parameters:

Returns:

  • (Array[Stdlib::Ip_address])


1
2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'modules/wmflib/functions/service/get_ips_for_services.pp', line 1

function wmflib::service::get_ips_for_services(
    Hash[String, Wmflib::Service] $services,
    String $site,
) >> Array[Stdlib::Ip_address] {
    $services.filter |$lvs_name, $svc| {
        $site in $svc['ip']
    }
    .map |$lvs_name, $svc| {
        $svc['ip'][$site].values()
    }
    .flatten()
    .unique()
    .sort()
}