your problems is that processorcount is a string, here are some examples that works:
<% processorcount.each do |cpu| -%> <%= cpu.to_i * 100 %> <%# more stuff -%> <% end %> <% for cpu in (0..processorcount.to_i) %> <%= cpu %> <%end%> <% processorcount.to_i.times do |cpu| %> <%= cpu %> <%end%> Ohad On Thu, Nov 19, 2009 at 11:22 PM, Christopher Johnston <chjoh...@gmail.com>wrote: > How come this doesnt work? I write this in a normal ruby script it > works just fine. > > <% for cpu in (0..processorcount) %> > > I want to loop through the number of processor so a specific action > can be taken to generate content for a file. I get an error on the > master of: > > bad value for range at /etc/puppet" > > -Chris > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=. > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.