Puppet Function: squid::acl::normalise
- Defined in:
- modules/squid/functions/acl/normalise.pp
- Function type:
- Puppet Language
Summary
take general squid::acl and converts the src role and dst hosts to ip addressesOverview
SPDX-License-Identifier: Apache-2.0
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'modules/squid/functions/acl/normalise.pp', line 17
function squid::acl::normalise (
Hash[String[1], Squid::Acl] $acl,
) >> Hash[String[1], Squid::Acl] {
Hash($acl.map |$name, $acl| {
$src = $acl['src'].map |$role| { wmflib::role::ips($role) }.flatten.sort.unique
$dst = $acl['dst_type'] ? {
'host' => $acl['dst'].map |$host| { dnsquery::lookup($host) }.flatten.sort.unique,
default => $acl['dst'],
}
[$name, $acl + {'src' => $src, 'dst' => $dst}]
})
}
|