Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8393189
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/manifests/mod.pp b/manifests/mod.pp
index 915b48cf..a40e664e 100644
--- a/manifests/mod.pp
+++ b/manifests/mod.pp
@@ -1,32 +1,34 @@
define apache::mod (
$package = undef
) {
$mod = $name
include apache::params
#include apache #This creates duplicate resources in rspec-puppet
$mod_packages = $apache::params::mod_packages
+ $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
if $package {
$package_REAL = $package
- } elsif $mod_packages[$mod] {
- $package_REAL = $mod_packages[$mod]
+ } elsif "$mod_package" {
+ $package_REAL = $mod_package
}
$mod_libs = $apache::params::mod_libs
- if $mod_libs {
- $lib = $mod_libs[$mod]
+ $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
+ if "${mod_lib}" {
+ $lib = $mod_lib
}
if $package_REAL {
package { $package_REAL:
ensure => present,
require => Package['httpd'],
before => A2mod[$mod],
}
}
a2mod { $mod:
ensure => present,
lib => $lib,
require => Package['httpd'],
notify => Service['httpd'],
}
}
diff --git a/manifests/params.pp b/manifests/params.pp
index 085606de..e7e3f550 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -1,83 +1,84 @@
# Class: apache::params
#
# This class manages Apache parameters
#
# Parameters:
# - The $user that Apache runs as
# - The $group that Apache runs as
# - The $apache_name is the name of the package and service on the relevant
# distribution
# - The $php_package is the name of the package that provided PHP
# - The $ssl_package is the name of the Apache SSL package
# - The $apache_dev is the name of the Apache development libraries package
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
class apache::params {
$ssl = true
$template = 'apache/vhost-default.conf.erb'
$priority = '25'
$servername = ''
$serveraliases = ''
$auth = false
$redirect_ssl = false
$options = 'Indexes FollowSymLinks MultiViews'
$override = 'None'
$vhost_name = '*'
if $::osfamily == 'redhat' or $::operatingsystem == 'amazon' {
$user = 'apache'
$group = 'apache'
$apache_name = 'httpd'
$php_package = 'php'
$mod_python_package = 'mod_python'
$mod_wsgi_package = 'mod_wsgi'
$mod_auth_kerb_package = 'mod_auth_kerb'
$ssl_package = 'mod_ssl'
$apache_dev = 'httpd-devel'
$httpd_dir = '/etc/httpd'
$conf_dir = "${httpd_dir}/conf"
$mod_dir = "${httpd_dir}/mod.d"
$vdir = "${httpd_dir}/conf.d"
$conf_file = 'httpd.conf'
$mod_packages = {
'dev' => 'httpd-devel',
'fcgid' => 'mod_fcgid',
'perl' => 'mod_perl',
'php5' => 'php',
'proxy_html' => 'mod_proxy_html',
'python' => 'mod_python',
'ssl' => 'mod_ssl',
'wsgi' => 'mod_wsgi',
}
$mod_libs = {
'php5' => 'libphp5.so',
}
} elsif $::osfamily == 'debian' {
$user = 'www-data'
$group = 'www-data'
$apache_name = 'apache2'
$php_package = 'libapache2-mod-php5'
$mod_python_package = 'libapache2-mod-python'
$mod_wsgi_package = 'libapache2-mod-wsgi'
$mod_auth_kerb_package = 'libapache2-mod-auth-kerb'
$apache_dev = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
$vdir = '/etc/apache2/sites-enabled/'
$proxy_modules = ['proxy', 'proxy_http']
$mod_packages = {
'dev' => ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev'],
'fcgid' => 'libapache2-mod-fcgid',
'perl' => 'libapache2-mod-perl2',
'php5' => 'libapache2-mod-php5',
'python' => 'libapache2-mod-python',
'wsgi' => 'libapache2-mod-wsgi',
}
+ $mod_libs = {}
} else {
fail("Class['apache::params']: Unsupported operatingsystem: $operatingsystem")
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jun 4 2025, 7:10 PM (9 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398952
Attached To
rSPAPA puppet-puppetlabs-apache
Event Timeline
Log In to Comment