You could likely use iteration in the future parser or recursion to build up the string, but what sits in my mind as the path of least resistance is inline templating (c.f.
).
I ran a quick test along these lines and it appeared to produce appropriate output:
$search = {
'cust0' => 'a41mgt.local all-for-one.local',
'cust1' => 'A4T.local',
'cust2' => 'a4y.remote',
}
notify { "ILT Search: ${search}": }
$string = inline_template("<%= @search.values.join(' ') %>")
notify { "ILT String: ${string}": }
Notice: ILT Search: cust2a4y.remotecust1A4T.localcust0a41mgt.local all-for-one.local
Notice: ILT String: a4y.remote A4T.local a41mgt.local all-for-one.local
This can definitely be improved upon, but it seems to do the trick.