On 04/19/2011 09:09 AM, Ohad Levy wrote: > > > On Tue, Apr 19, 2011 at 8:42 AM, Miki Shapiro <mikishap...@gmail.com > <mailto:mikishap...@gmail.com>> wrote: > > clunky and could probably be written better. > > My 2 questions are: > 1. Can I somehow get a list of keys from the hash itself (a list > that will behave like an array that I can feed into a defined type) > instead of "manually" defining $array for this purpose? > > fuzzy workaround: > > $keys = inline_template("<%= hash.keys %>")
Ah, but won't that imply a "to_s" on the resulting array of keys? You may want to join the keys (say using ",") and split by that same comma in the DSL. Pseudocode: $keys = split(",", inline_template("<%= hash.keys.join(',') %>")) Cheers, 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.