owner => 'root',
group => 0,
mode => '0644';
- "${lighttpd::conf_dir}/config.conf":
- ensure => file,
- require => Package['lighttpd'],
- before => Service['lighttpd'],
- owner => 'root',
- group => 0,
- mode => '0644';
'/etc/cron.daily/clean_lighttpd_compress':
content => "find /var/cache/lighttpd/compress -type f -mtime +10 | xargs -r rm\n",
require => Package['lighttpd'],
+# manage centos specific things for
+# lighttpd
class lighttpd::centos inherits lighttpd::base {
+ File{
+ require => Package['lighttpd'],
+ before => Service['lighttpd'],
+ }
file{
+ "${lighttpd::conf_dir}/config.conf":
+ ensure => file,
+ owner => 'root',
+ group => 0,
+ mode => '0644';
'/var/cache/lighttpd':
- ensure => directory,
- require => Package['lighttpd'];
+ ensure => directory;
'/var/cache/lighttpd/compress':
- ensure => directory,
- require => Package['lighttpd'],
- owner => lighttpd, group => lighttpd, mode => 0640;
+ ensure => directory,
+ owner => 'lighttpd',
+ group => 'lighttpd',
+ mode => '0640';
}
}
mode => '0644';
}
- file_line{$name:
- ensure => $ensure,
- path => "${lighttpd::conf_dir}/config.conf",
- line => "include \"${lighttpd::conf_dir_name}/${name}.conf\"",
- notify => Service['lighttpd'],
+ case $operatingsystem {
+ centos,redhat,fedora: {
+ file_line{$name:
+ ensure => $ensure,
+ path => "${lighttpd::conf_dir}/config.conf",
+ line => "include \"${lighttpd::conf_dir_name}/${name}.conf\"",
+ notify => Service['lighttpd'],
+ }
+ }
}
case $content {