]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/apache2/manifests/init.pp
apache hosts load mod info and status, and serve it
[dsa-puppet.git] / modules / apache2 / manifests / init.pp
index 0e74f7b1088bd14b366b6449832a27808335cf42..633a47328605ae80ffdd53ce360011739849b9fb 100644 (file)
@@ -1,9 +1,18 @@
+define enable_module($module) {
+        exec { "/usr/sbin/a2enmod $module": }
+}
+
 class apache2 {
        package {
                apache2: ensure => installed;
                logrotate: ensure => installed;
        }
 
+        enable_module {
+                "info": module => info;
+                "status": module => status;
+        }
+
        file {
                "/etc/apache2/conf.d/ressource-limits":
                        content => template("apache2/ressource-limits.erb"),
@@ -14,6 +23,15 @@ class apache2 {
                                     "puppet:///apache2/common/etc/apache2/conf.d/security" ],
                        require => Package["apache2"],
                        notify  => Exec["apache2 reload"];
+               "/etc/apache2/conf.d/local-serverinfo":
+                       source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/local-serverinfo",
+                                    "puppet:///apache2/common/etc/apache2/conf.d/local-serverinfo" ],
+                       require => Package["apache2"],
+               "/etc/apache2/conf.d/server-status":
+                       source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/server-status",
+                                    "puppet:///apache2/common/etc/apache2/conf.d/server-status" ],
+                       require => Package["apache2"],
+                       notify  => Exec["apache2 reload"];
 
                "/etc/apache2/sites-available/default-debian.org":
                        source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/default-debian.org",