Hi,
I have read about the known "feature" of ruby 1.8.7 not using the
entered
order for each_pair and using some random order instead, has anyone
managed a work around for this that does not mean having to upgrade to
1.9.3
I have hiera data that looks something like this
my::variables:
"variable1":
comment: '# this is a variable comment'
value: '100'
"variable2":
comment: '# this is a variable comment'
value: '200'
"variable3":
comment: '# this is a variable comment'
value: '300'
in my template i have
<% @vars.sort.each_list do |varname, hash | -%>
<%= hash['comment'] %>
<%= varname %> = <%= hash['value'] %>
<% end -%>
i wanted them to come out like the following but they come out in a random
order so nearly every puppet run could cause a change and restart a service
# this is a variable comment
variable1 = 100
# this is a variable comment
variable2 = 200
# this is a variable comment
variable3 = 300
any ideas
cheers
Simon
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/9fe1a637-0c1b-4d08-a046-c20d27426154%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.