Joining array from Hiera+concat other value in erb?
Hi, I'm just starting to covert from using CSV files and extlookup to Hiera and ran into a small snag. In my manifest I have two lookups for a regular string and an array.
$cassandrasvr = hiera("cassandrasvr"), $cassandraport = hiera("cassandraport"),
And my YAML file contains:
cassandraport: '9160' cassandrasvr: - cass1.abc.com - cass2.abc.com - cass3.abc.com - cass4.abc.com - cass1.xyz.com - cass2.xyz.com
In my ERB template, I have the following which will print out the contents of the array, separated by a comma (except the last value).
cassandrasvr=<%= cassandrasvr.join(',') %>
And the output is this ... (more)