On Thursday, July 11, 2013 8:41:03 AM UTC-5,I wrote: > > > $kernel_fact_stem = 'installed_kernel' > $kernel_list = inline_template("<%= > (0...@installed_kernel_count.to_i).collect{|n| @kernel_fact_stem + > n.to_s}.join(',') %>") > > Sorry, I think I've buggered that up a bit. It should be more like this:
$kernel_list = inline_template("<%= (0...@installed_kernel_count.to_i).collect{|n| eval('@' + @kernel_fact_stem + n.to_s)}.join(',') %>") The idea is that you construct the name of the desired Puppet variable via Ruby code, then retrieve the associated value (the original version would have returned the variable names instead of their values). You could also use a similar approach based on scope.lookupvar() if you dislike eval(). John -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.