Puppet Function: wmflib::role::ips
- Defined in:
- modules/wmflib/functions/role/ips.pp
- Function type:
- Puppet Language
Summary
function to return a list of ips running a specific role 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 role. 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 daysOverview
SPDX-License-Identifier: Apache-2.0
9 10 11 12 13 14 15 16 17 18 19 |
# File 'modules/wmflib/functions/role/ips.pp', line 9
function wmflib::role::ips (
Pattern[/\A\w+(::\w+)*\z/] $role,
Variant[Wmflib::Sites, Array[Wmflib::Sites]] $location = [],
) >> Array[Stdlib::Host] {
$_role = $role.capitalize.stdlib::start_with('Role::') ? {
true => $role,
default => "Role::${role}",
}
wmflib::class::ips($_role, $location)
}
|