Key apache memory for buildd master on role, not host name
[mirror/dsa-puppet.git] / modules / apache2 / templates / ressource-limits.erb
index 9137148..48875e5 100644 (file)
@@ -5,14 +5,18 @@
 
 RLimitCPU 180
 <%=
-case fqdn
-       when "berlioz.debian.org" then
-               ""
-       when "grieg.debian.org", "tchaikovsky.debian.org" then
-               # buildd.debian.org
-               "RLimitMEM "+(96 * 1024**2).to_s
-       else
-               "RLimitMEM "+(32 * 1024**2).to_s
+if scope.lookupvar('site::nodeinfo')['buildd_master'] then
+                       # buildd.debian.org
+                       "RLimitMEM "+(96 * 1024**2).to_s
+else
+       case fqdn
+               when "berlioz.debian.org" then
+                       ""
+               when "tchaikovsky.debian.org" then
+                       "RLimitMEM "+(96 * 1024**2).to_s
+               else
+                       "RLimitMEM "+(32 * 1024**2).to_s
+       end
 end
 %>
 RLimitNPROC 128