How to iterate over host_param()

Previously I had snipped in a provisioning template that would dump all the host params to a file on the system to save for posterity sake.

With something like this:
<% @host.params.sort.each do |k,v| -%>
“<%= k %>” : “<%= v %>”,
<% end -%>

Apparently @host.params is going away, so I was wondering how I would do the same thing and iterate over the host_param() list.

Any ideas?

You should be able to get the same results via

<% host_enc['parameters'].sort.each do |k,v| -%>
<%= k -%> : <%= v -%>,
<% end -%>

hope this helps