d-ports: set apache memlimit
[mirror/dsa-puppet.git] / modules / apache2 / manifests / init.pp
index a4e14ca..b1f20a2 100644 (file)
@@ -1,3 +1,11 @@
+# = Class: apache2
+#
+# Standard apache config debian.org hosts
+#
+# == Sample Usage:
+#
+#   include apache2
+#
 class apache2 {
        package { 'apache2':
                ensure => installed,
@@ -33,6 +41,20 @@ class apache2 {
                ensure => absent,
        }
 
+       if has_role('buildd_master') {
+               $memlimit = 192 * 1024 * 1024
+       } elsif has_role('buildd_ports_master') {
+               $memlimit = 192 * 1024 * 1024
+       } elsif has_role('nagiosmaster') {
+               $memlimit = 96 * 1024 * 1024
+       } elsif has_role('packagesqamaster') {
+               $memlimit = 192 * 1024 * 1024
+       } elsif has_role('nm') {
+               $memlimit = 96 * 1024 * 1024
+       } else {
+               $memlimit = 32 * 1024 * 1024
+       }
+
        apache2::config { 'resource-limits':
                content => template('apache2/resource-limits.erb'),
        }
@@ -74,6 +96,11 @@ class apache2 {
                content => template('apache2/default-index.html'),
        }
 
+       file { '/var/log/apache2/.nobackup':
+               mode    => '0644',
+               content => '',
+       }
+
        munin::check { 'apache_accesses': }
        munin::check { 'apache_processes': }
        munin::check { 'apache_volume': }