The cookbook is on GitHub.
Here is the new default.rb:
def memory
"#{node['kernel']['cs_info']['total_physical_memory']}"
end
# splitting out based on OS vsersion and then the case statement is XenServer(4,6,8,16) then vSphere/vCloud(4,6,8,16)
if node['platform_version'] >= "6.2.9200"
case memory
when "4286169088"
include_recipe "pagefile::4gb"
when "6433652736"
include_recipe "pagefile::6gb"
when "8581136384"
include_recipe "pagefile::8gb"
when "17171070976"
include_recipe "pagefile::16gb"
when "4294496256"
include_recipe "pagefile::4gb"
when "6441979904"
include_recipe "pagefile::6gb"
when "8589463552"
include_recipe "pagefile::8gb"
when "17179398144"
include_recipe "pagefile::16gb"
end
else
case memory
when "4290367488"
include_recipe "pagefile::4gb"
when "6437851136"
include_recipe "pagefile::6gb"
when "8585334784"
include_recipe "pagefile::8gb"
when "17175269376"
include_recipe "pagefile::16gb"
when "4294500352"
include_recipe "pagefile::4gb"
when "6441984000"
include_recipe "pagefile::6gb"
when "8589467648"
include_recipe "pagefile::8gb"
when "17179402240"
include_recipe "pagefile::16gb"
end
end
"#{node['kernel']['cs_info']['total_physical_memory']}"
end
# splitting out based on OS vsersion and then the case statement is XenServer(4,6,8,16) then vSphere/vCloud(4,6,8,16)
if node['platform_version'] >= "6.2.9200"
case memory
when "4286169088"
include_recipe "pagefile::4gb"
when "6433652736"
include_recipe "pagefile::6gb"
when "8581136384"
include_recipe "pagefile::8gb"
when "17171070976"
include_recipe "pagefile::16gb"
when "4294496256"
include_recipe "pagefile::4gb"
when "6441979904"
include_recipe "pagefile::6gb"
when "8589463552"
include_recipe "pagefile::8gb"
when "17179398144"
include_recipe "pagefile::16gb"
end
else
case memory
when "4290367488"
include_recipe "pagefile::4gb"
when "6437851136"
include_recipe "pagefile::6gb"
when "8585334784"
include_recipe "pagefile::8gb"
when "17175269376"
include_recipe "pagefile::16gb"
when "4294500352"
include_recipe "pagefile::4gb"
when "6441984000"
include_recipe "pagefile::6gb"
when "8589467648"
include_recipe "pagefile::8gb"
when "17179402240"
include_recipe "pagefile::16gb"
end
end
No comments:
Post a Comment