Hello

Sorry to ressurect this old thread, but I've just found this issue 
upgrading from Puppet 2.7.x to Puppet 3. It's true that ruby 1.8 hash order 
cannot be relied on, but it should always be the same, right? I mean, one 
doesn't know which order the hash contents will be iterated on, but 
whatever order ruby chooses should never change.

We had this working with no issues in 2.7.x and ruby 1.8, but now on Puppet 
3 we're getting random reorderings. I suspect there's a problem in Puppet 
in this case.

Best,
Andre

On Wednesday, March 28, 2012 9:39:45 AM UTC-3, R.I. Pienaar wrote:
>
> ----- Original Message -----
> > From: "Martijn Grendelman" <mar...@iphion.nl <javascript:>>
>
> <snip>
>
> > 
> http://serverfault.com/questions/368784/puppet-and-templates-how-to-loop-sequently-and-not-randomly
> > 
> > which suggests to do something like
> > 
> >     <% aliases.sort_by {|key, value| key}.each_pair do |key, val| -%>
> >     <% end -%>
> > 
> > Will it work? Is that a proper solution?
>
> ruby hashes are not stored in predictable order so this will happen, the 
> proposed
> solution should work.
>
> But as always the best is just to test it and see how it goes, it wont 
> bite :)
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/068cf600-4f30-41d9-8249-30e6cec096fd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to