1 |
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 |
|
11 |
if ($lsbdistrelease == '1') or ($lsbdistid == 'MandrivaLinux') { |
12 |
package { 'apache-conf': } |
13 |
} else { |
14 |
package { 'apache': } |
15 |
} |
16 |
|
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 |
} |