Puppet Function: wmflib::class::ips

Defined in:
modules/wmflib/functions/class/ips.pp
Function type:
Puppet Language

Summary

function to return a list of ips running a specific class This function relies on data being present in puppetdb. This means that new nodes will be returned after their first successful puppet run using the specified class. It also means that nodes will be removed from the results once they have been purged from puppetdb. This currently happens when a server has failed to run puppet for 14 days

Overview

wmflib::class::ips(Wmflib::Resource::Type $class, Variant[Wmflib::Sites, Array[Wmflib::Sites]] $location = [])Array[Stdlib::Host]

SPDX-License-Identifier: Apache-2.0

Parameters:

  • class (Wmflib::Resource::Type)

    the class to search for

  • optional

    list of sites if present filter to output based on the sites passed

  • location (Variant[Wmflib::Sites, Array[Wmflib::Sites]]) (defaults to: [])

Returns:

  • (Array[Stdlib::Host])


9
10
11
12
13
14
15
# File 'modules/wmflib/functions/class/ips.pp', line 9

function wmflib::class::ips (
    Wmflib::Resource::Type                       $class,
    Variant[Wmflib::Sites, Array[Wmflib::Sites]] $location = [],
) >> Array[Stdlib::Host] {

    wmflib::resource::ips('class', $location, wmflib::resource::capitalize($class))
}