From 2b79e8bdd11718d488912dbefcbd584144a1716a Mon Sep 17 00:00:00 2001 From: David Alden Date: Tue, 29 Nov 2011 10:39:23 -0500 Subject: [PATCH] (#11070) Add support for Scientific Linux This patch adds Scientific Linux to the various case statements so it is supported. This also fixed the various templates so that the log location is variable depending on weither the OS is Redhat based or Debian based. --- manifests/mod/python.pp | 2 +- manifests/mod/wsgi.pp | 2 +- manifests/params.pp | 2 +- manifests/ssl.pp | 2 +- manifests/vhost.pp | 1 + templates/vhost-default.conf.erb | 4 ++-- templates/vhost-proxy.conf.erb | 4 ++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifests/mod/python.pp b/manifests/mod/python.pp index 757745c..7c730f8 100644 --- a/manifests/mod/python.pp +++ b/manifests/mod/python.pp @@ -3,7 +3,7 @@ class apache::mod::python { package { "python": name => $operatingsystem ? { - centos => "mod_python", + 'centos', 'fedora', 'redhat', 'scientific' => "mod_python", default => "libapache2-mod-python", }, ensure => installed, diff --git a/manifests/mod/wsgi.pp b/manifests/mod/wsgi.pp index 1deb884..776a315 100644 --- a/manifests/mod/wsgi.pp +++ b/manifests/mod/wsgi.pp @@ -3,7 +3,7 @@ class apache::mod::wsgi { package { "wsgi": name => $operatingsystem ? { - centos => "mod_wsgi", + 'centos', 'fedora', 'redhat', 'scientific' => "mod_wsgi", default => "libapache2-mod-wsgi", }, ensure => installed, diff --git a/manifests/params.pp b/manifests/params.pp index 8012fdc..950ffc6 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -31,7 +31,7 @@ class apache::params { $vhost_name = '*' case $operatingsystem { - 'centos', 'redhat', 'fedora': { + 'centos', 'redhat', 'fedora', 'scientific': { $apache_name = 'httpd' $php_package = 'php' $ssl_package = 'mod_ssl' diff --git a/manifests/ssl.pp b/manifests/ssl.pp index f18bb14..6204d70 100644 --- a/manifests/ssl.pp +++ b/manifests/ssl.pp @@ -17,7 +17,7 @@ class apache::ssl { include apache case $operatingsystem { - 'centos', 'fedora', 'redhat': { + 'centos', 'fedora', 'redhat', 'scientific': { package { $apache::params::ssl_package: require => Package['httpd'], } diff --git a/manifests/vhost.pp b/manifests/vhost.pp index f3c669b..76ea856 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -36,6 +36,7 @@ define apache::vhost( $auth = $apache::params::auth, $redirect_ssl = $apache::params::redirect_ssl, $options = $apache::params::options, + $apache_name = $apache::params::apache_name, $vhost_name = $apache::params::vhost_name ) { diff --git a/templates/vhost-default.conf.erb b/templates/vhost-default.conf.erb index 4820bd6..5352029 100644 --- a/templates/vhost-default.conf.erb +++ b/templates/vhost-default.conf.erb @@ -18,9 +18,9 @@ NameVirtualHost <%= vhost_name %>:<%= port %> Order allow,deny allow from all - ErrorLog /var/log/apache2/<%= name %>_error.log + ErrorLog /var/log/<%= apache_name %>/<%= name %>_error.log LogLevel warn - CustomLog /var/log/apache2/<%= name %>_access.log combined + CustomLog /var/log/<%= apache_name %>/<%= name %>_access.log combined ServerSignature Off diff --git a/templates/vhost-proxy.conf.erb b/templates/vhost-proxy.conf.erb index d8be904..a7a14c0 100644 --- a/templates/vhost-proxy.conf.erb +++ b/templates/vhost-proxy.conf.erb @@ -20,9 +20,9 @@ NameVirtualHost <%= vhost_name %>:<%= port %> ProxyPassReverse / <%= dest %>/ ProxyPreserveHost On - ErrorLog /var/log/apache2/<%= name %>_error.log + ErrorLog /var/log/<%= apache_name %>/<%= name %>_error.log LogLevel warn - CustomLog /var/log/apache2/<%= name %>_access.log combined + CustomLog /var/log/<%= apache_name %>/<%= name %>_access.log combined