28
|
1 |
_osfamily = fact('osfamily') |
|
2 |
_operatingsystem = fact('operatingsystem') |
|
3 |
_operatingsystemrelease = fact('operatingsystemrelease').to_f |
|
4 |
|
|
5 |
case _osfamily |
|
6 |
when 'RedHat' |
|
7 |
$confd_dir = '/etc/httpd/conf.d' |
|
8 |
$mod_dir = '/etc/httpd/conf.d' |
|
9 |
$conf_file = '/etc/httpd/conf/httpd.conf' |
|
10 |
$ports_file = '/etc/httpd/conf/ports.conf' |
|
11 |
$vhost_dir = '/etc/httpd/conf.d' |
|
12 |
$vhost = '/etc/httpd/conf.d/15-default.conf' |
|
13 |
$run_dir = '/var/run/httpd' |
|
14 |
$service_name = 'httpd' |
|
15 |
$package_name = 'httpd' |
|
16 |
$error_log = 'error_log' |
|
17 |
$suphp_handler = 'php5-script' |
|
18 |
$suphp_configpath = 'undef' |
|
19 |
|
|
20 |
if (_operatingsystem == 'Fedora' and _operatingsystemrelease >= 18) or (_operatingsystem != 'Fedora' and _operatingsystemrelease >= 7) |
|
21 |
$apache_version = '2.4' |
|
22 |
else |
|
23 |
$apache_version = '2.2' |
|
24 |
end |
|
25 |
when 'Debian' |
|
26 |
$confd_dir = '/etc/apache2/conf.d' |
|
27 |
$mod_dir = '/etc/apache2/mods-available' |
|
28 |
$conf_file = '/etc/apache2/apache2.conf' |
|
29 |
$ports_file = '/etc/apache2/ports.conf' |
|
30 |
$vhost = '/etc/apache2/sites-available/15-default.conf' |
|
31 |
$vhost_dir = '/etc/apache2/sites-enabled' |
|
32 |
$run_dir = '/var/run/apache2' |
|
33 |
$service_name = 'apache2' |
|
34 |
$package_name = 'apache2' |
|
35 |
$error_log = 'error.log' |
|
36 |
$suphp_handler = 'x-httpd-php' |
|
37 |
$suphp_configpath = '/etc/php5/apache2' |
|
38 |
|
|
39 |
if _operatingsystem == 'Ubuntu' and _operatingsystemrelease >= 13.10 |
|
40 |
$apache_version = '2.4' |
|
41 |
elsif _operatingsystem == 'Debian' and _operatingsystemrelease >= 8.0 |
|
42 |
$apache_version = '2.4' |
|
43 |
else |
|
44 |
$apache_version = '2.2' |
|
45 |
end |
|
46 |
when 'FreeBSD' |
|
47 |
$confd_dir = '/usr/local/etc/apache24/Includes' |
|
48 |
$mod_dir = '/usr/local/etc/apache24/Modules' |
|
49 |
$conf_file = '/usr/local/etc/apache24/httpd.conf' |
|
50 |
$ports_file = '/usr/local/etc/apache24/Includes/ports.conf' |
|
51 |
$vhost = '/usr/local/etc/apache24/Vhosts/15-default.conf' |
|
52 |
$vhost_dir = '/usr/local/etc/apache24/Vhosts' |
|
53 |
$run_dir = '/var/run/apache24' |
|
54 |
$service_name = 'apache24' |
|
55 |
$package_name = 'apache24' |
|
56 |
$error_log = 'http-error.log' |
|
57 |
|
|
58 |
$apache_version = '2.2' |
|
59 |
when 'Gentoo' |
|
60 |
$confd_dir = '/etc/apache2/conf.d' |
|
61 |
$mod_dir = '/etc/apache2/modules.d' |
|
62 |
$conf_file = '/etc/apache2/httpd.conf' |
|
63 |
$ports_file = '/etc/apache2/ports.conf' |
|
64 |
$vhost = '/etc/apache2/vhosts.d/15-default.conf' |
|
65 |
$vhost_dir = '/etc/apache2/vhosts.d' |
|
66 |
$run_dir = '/var/run/apache2' |
|
67 |
$service_name = 'apache2' |
|
68 |
$package_name = 'www-servers/apache' |
|
69 |
$error_log = 'http-error.log' |
|
70 |
|
|
71 |
$apache_version = '2.4' |
|
72 |
else |
|
73 |
$apache_version = '0' |
|
74 |
end |
|
75 |
|