Puppet Function: wmflib::hosts2ips
- Defined in:
- modules/wmflib/functions/hosts2ips.pp
- Function type:
- Puppet Language
Summary
converts a list of hosts to a list of ip addressesOverview
SPDX-License-Identifier: Apache-2.0
4 5 6 7 8 9 10 11 12 13 |
# File 'modules/wmflib/functions/hosts2ips.pp', line 4
function wmflib::hosts2ips (
Array[Stdlib::Host] $hosts,
) >> Array[Stdlib::IP::Address] {
$hosts.map |$host| {
$host ? {
Stdlib::IP::Address => $host,
default => dnsquery::lookup($host, true)
}
}.flatten.sort
}
|