Puppet Function: wmflib::service::get_services_for_lvs

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

Overview

wmflib::service::get_services_for_lvs(String $class, String $site)Hash[String, Wmflib::Service]

Select services that belong to this LVS server. We're selecting services that are:

  • in the lvs class of this server (or this server is secondary)

  • in a state different from 'service_setup'

  • configured in the datacenter we're in.

Parameters:

Returns:

  • (Hash[String, Wmflib::Service])


7
8
9
10
11
# File 'modules/wmflib/functions/service/get_services_for_lvs.pp', line 7

function wmflib::service::get_services_for_lvs(String $class, String $site) >> Hash[String, Wmflib::Service] {
  wmflib::service::fetch().filter |$name, $srv| {
        $srv['state'] != 'service_setup' and $::lvs::configuration::lvs_class in [$srv['lvs']['class'], 'secondary'] and $site in $srv['sites']
  }
}