Math expression in attributes/default.rb


#1

Does chef supports math expressions in attributes/default.rb ?
I need to set up set_unless[:apache][:prefork][:startservers] depending
on the total memory and some factors…

Does anybody known formula for other apache settings
like this:

set_unless[:apache][:prefork][:startservers]
set_unless[:apache][:prefork][:minspareservers]
set_unless[:apache][:prefork][:maxspareservers]
set_unless[:apache][:prefork][:serverlimit]
set_unless[:apache][:prefork][:maxclients]
set_unless[:apache][:prefork][:maxrequestsperchild]

?

Thanks.


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru


#2

It’s ruby.

So you can put arbitrary expressions as the code to set attributes, scope
and timing notwithstanding.

On Tue, Jul 6, 2010 at 1:47 AM, Vasiliy G Tolstov v.tolstov@selfip.ruwrote:

Does chef supports math expressions in attributes/default.rb ?
I need to set up set_unless[:apache][:prefork][:startservers] depending
on the total memory and some factors…

Does anybody known formula for other apache settings
like this:

set_unless[:apache][:prefork][:startservers]
set_unless[:apache][:prefork][:minspareservers]
set_unless[:apache][:prefork][:maxspareservers]
set_unless[:apache][:prefork][:serverlimit]
set_unless[:apache][:prefork][:maxclients]
set_unless[:apache][:prefork][:maxrequestsperchild]

?

Thanks.


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru