I have the following hiera:
profile::example::firewalls:
- serverclass1:
label: http
port: 80
label: https
port: 443
- serverclass2:
label: ssh
port: 22
label: telnet
port: 21
I try to call it in the following way in an erb template:
<% @example = scope().call_function('hiera',['profile::example::firewalls']) -%>
show me the array!
<%= @example %>
Oddly this returns the following:
+show me the array!
+[{"serverclass1"=>nil, "label"=>"https", "port"=>443}, {"serverclass2"=>nil, "label"=>"telnet", "port"=>21}]
Once I have a complete array I'll eventually use this within a for/each loop within ruby, but for the moment this seems to return just the final result and not everything I'd expect.