Merge branch 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet
authorPeter Palfrader <peter@palfrader.org>
Sun, 6 Sep 2009 18:11:03 +0000 (20:11 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 6 Sep 2009 18:11:03 +0000 (20:11 +0200)
* 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet:
  apache is weird
  Oh puppet, you are so picky
  Make rlimitmem host dependent
  Make ressource-limits a template

modules/apache2/files/common/etc/apache2/conf.d/ressource-limits [deleted file]
modules/apache2/manifests/init.pp
modules/apache2/templates/ressource-limits.erb [new file with mode: 0644]

diff --git a/modules/apache2/files/common/etc/apache2/conf.d/ressource-limits b/modules/apache2/files/common/etc/apache2/conf.d/ressource-limits
deleted file mode 100644 (file)
index 040313f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-RLimitCPU 180
-RLimitMEM 67108864
-RLimitNPROC 128
index a0af075..0e74f7b 100644 (file)
@@ -6,8 +6,7 @@ class apache2 {
 
        file {
                "/etc/apache2/conf.d/ressource-limits":
-                       source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/ressource-limits",
-                                    "puppet:///apache2/common/etc/apache2/conf.d/ressource-limits" ],
+                       content => template("apache2/ressource-limits.erb"),
                        require => Package["apache2"],
                        notify  => Exec["apache2 reload"];
                "/etc/apache2/conf.d/security":
diff --git a/modules/apache2/templates/ressource-limits.erb b/modules/apache2/templates/ressource-limits.erb
new file mode 100644 (file)
index 0000000..66cc046
--- /dev/null
@@ -0,0 +1,16 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+RLimitCPU 180
+<%=
+case fqdn
+       when "cimarosa.debian.org" then
+               # buildd.debian.org
+               "RLimitMEM "+(96 * 1024**2).to_s
+       else
+               "RLimitMEM "+(32 * 1024**2).to_s
+end
+%>
+RLimitNPROC 128