Its definitely there.. I even put a <%= processorcount %> to make sure the variable is set.
<% processorcount.to_i-1 %> <% for cpu in (0..processorcount) %> Facter version is 1.52 # facter | grep proc processor0 => Intel(R) Xeon(R) CPU X5570 @ 2.93GHz processor1 => Intel(R) Xeon(R) CPU X5570 @ 2.93GHz processor2 => Intel(R) Xeon(R) CPU X5570 @ 2.93GHz processor3 => Intel(R) Xeon(R) CPU X5570 @ 2.93GHz processorcount => 4 On Mon, Nov 23, 2009 at 5:11 AM, Julian Simpson <simpsonjul...@gmail.com>wrote: > 2009/11/19 Christopher Johnston <chjoh...@gmail.com>: > > 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" > > Processorcount isn't resolved. What machine are you running it on? > What version of facter do you have? > > >> processorcount=nil > => nil > >> for cpu in (0..processorcount) > >> puts cpu > >> end > ArgumentError: bad value for range > from (irb):2 > >> > > Cheers > > J. > > -- > > 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=.