Puppet Function: postfix::flatten_host
- Defined in:
- functions/flatten_host.pp
- Function type:
- Puppet Language
Overview
Flatten a host structure to a string.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'functions/flatten_host.pp', line 12
function postfix::flatten_host(Optional[Variant[Postfix::Type::Lookup::LDAP::Host, Postfix::Type::Lookup::MySQL::Host, Postfix::Type::Lookup::PgSQL::Host, Postfix::Type::Lookup::Memcache::Host]] $host) {
$host ? {
undef => undef,
default => type($host) ? {
Type[Tuple] => join($host.map |$x| {
type($x) ? {
Type[Bodgitlib::Host] => bodgitlib::enclose_ipv6($x), # lint:ignore:unquoted_string_in_selector FIXME
default => $x,
}
}, ':'),
Type[Bodgitlib::Host] => bodgitlib::enclose_ipv6($host), # lint:ignore:unquoted_string_in_selector FIXME
default => $host,
},
}
}
|