Puppet Function: wmflib::googlebot_ranges_json
- Defined in:
- modules/wmflib/functions/googlebot_ranges_json.pp
- Function type:
- Puppet Language
Summary
Converts the given IP ranges into a Googlebot format hashOverview
SPDX-License-Identifier: Apache-2.0
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'modules/wmflib/functions/googlebot_ranges_json.pp', line 5
function wmflib::googlebot_ranges_json (
Array[Wmflib::IP::Address::CIDR] $prefixes,
String[1] $created,
) >> Hash[String[1], Any] {
{
'prefixes' => $prefixes.map |$prefix| {
$version = wmflib::ip_family($prefix)
$key = "ipv${version}Prefix"
$ret = {$key => $prefix}
$ret
},
'creationTime' => $created,
}
}
|