From e75a38070ab6a7d972782b199109757fb84d4677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 26 Nov 2009 10:10:14 +0200 Subject: [PATCH] Added php and perl modules to apache. --- apache/manifests/init.pp | 61 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/apache/manifests/init.pp b/apache/manifests/init.pp index 9575a25..28877c8 100644 --- a/apache/manifests/init.pp +++ b/apache/manifests/init.pp @@ -311,6 +311,66 @@ define apache::sslsite($root="none", $config="none", } +# Install mod_perl. +# +class apache::mod::perl { + + package { "mod_perl": + ensure => installed, + require => Package["httpd"], + } + + if defined(Service["httpd"]) { + file { "/etc/httpd/conf.http.d/perl.conf": + ensure => link, + target => "/etc/httpd/conf.d/perl.conf", + require => Package["mod_perl"], + notify => Service["httpd"], + } + } + + if defined(Service["httpsd"]) { + file { "/etc/httpd/conf.https.d/perl.conf": + ensure => link, + target => "/etc/httpd/conf.d/perl.conf", + require => Package["mod_perl"], + notify => Service["httpsd"], + } + } + +} + + +# Install PHP. +# +class apache::mod::php { + + package { "php": + ensure => installed, + require => Package["httpd"], + } + + if defined(Service["httpd"]) { + file { "/etc/httpd/conf.http.d/php.conf": + ensure => link, + target => "/etc/httpd/conf.d/php.conf", + require => Package["php"], + notify => Service["httpd"], + } + } + + if defined(Service["httpsd"]) { + file { "/etc/httpd/conf.https.d/php.conf": + ensure => link, + target => "/etc/httpd/conf.d/php.conf", + require => Package["php"], + notify => Service["httpsd"], + } + } + +} + + # Install mod_python. # class apache::mod::python { @@ -339,4 +399,3 @@ class apache::mod::python { } } -