On 04/15/2011 04:30 PM, Rob McBroom wrote: > Details below, but the essential problem is this: I need to take a list > of hostnames and assign an integer for each one and ensure that the > integer “is non-negative and is no more than three decimal digits in > length”. I’d prefer that the each hostname lead to the same integer > every time. I’ve never written anything in Ruby before yesterday > <https://twitter.com/#!/RobMcBroom/status/58628000895336448>, so anyone > with more experience have any ideas?
Reminds me of this function: http://docs.puppetlabs.com/references/stable/function.html#fqdnrand You may just want to look up its code in the puppet source. Shouldn't be too hard to whip something up from there. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.