1 |
class apache::base { |
2 |
include apache::var |
3 |
|
4 |
package { 'apache-mpm-prefork': } |
5 |
|
6 |
if ($lsbdistrelease == '1') or ($lsbdistid == 'MandrivaLinux') { |
7 |
package { 'apache-conf': } |
8 |
} else { |
9 |
package { 'apache': } |
10 |
} |
11 |
|
12 |
service { 'httpd': |
13 |
alias => 'apache', |
14 |
subscribe => [ Package['apache-mpm-prefork'] ], |
15 |
} |
16 |
|
17 |
exec { 'service httpd configtest': |
18 |
refreshonly => true, |
19 |
notify => Service['apache'], |
20 |
} |
21 |
|
22 |
apache::config { |
23 |
'/etc/httpd/conf.d/customization.conf': |
24 |
content => template('apache/customization.conf'); |
25 |
'/etc/httpd/conf/vhosts.d/00_default_vhosts.conf': |
26 |
content => template('apache/00_default_vhosts.conf'); |
27 |
} |
28 |
|
29 |
file { '/etc/logrotate.d/httpd': |
30 |
content => template('apache/logrotate') |
31 |
} |
32 |
} |