1 |
misc |
2688 |
class apache::base { |
2 |
|
|
|
3 |
|
|
# number of time the log file are rotated before being removed |
4 |
|
|
$httpdlogs_rotate = '24' |
5 |
|
|
|
6 |
|
|
$apache_user = 'apache' |
7 |
|
|
$apache_group = 'apache' |
8 |
|
|
|
9 |
|
|
package { 'apache-mpm-prefork': |
10 |
|
|
alias => 'apache', |
11 |
|
|
} |
12 |
|
|
|
13 |
boklm |
2859 |
if ($lsbdistrelease == '1') or ($lsbdistrelease == '2010.0') { |
14 |
|
|
package { 'apache-conf': } |
15 |
|
|
} |
16 |
misc |
2688 |
|
17 |
|
|
service { 'httpd': |
18 |
|
|
alias => 'apache', |
19 |
|
|
subscribe => [ Package['apache-mpm-prefork'] ], |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
exec { 'service httpd configtest': |
23 |
|
|
refreshonly => true, |
24 |
|
|
notify => Service['apache'], |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
apache::config { |
28 |
|
|
'/etc/httpd/conf.d/customization.conf': |
29 |
|
|
content => template('apache/customization.conf'); |
30 |
|
|
'/etc/httpd/conf/vhosts.d/00_default_vhosts.conf': |
31 |
|
|
content => template('apache/00_default_vhosts.conf'); |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
file { '/etc/logrotate.d/httpd': |
35 |
|
|
content => template('apache/logrotate') |
36 |
|
|
} |
37 |
|
|
} |