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()
}