]> gitweb.fluxo.info Git - puppet-lighttpd.git/commitdiff
this include construct is only needed on centos systems
authormh <mh@immerda.ch>
Sun, 21 Oct 2012 13:09:35 +0000 (15:09 +0200)
committermh <mh@immerda.ch>
Sun, 21 Oct 2012 13:09:35 +0000 (15:09 +0200)
manifests/base.pp
manifests/centos.pp
manifests/config/file.pp

index 0f942a58205f82af3ccef3f62284ccf8383273a8..3f2b799a7cf2a7c065d64953aeea7e6dc0f5f9c9 100644 (file)
@@ -33,13 +33,6 @@ class lighttpd::base {
       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'],
index faa16e96a190fb83c770cc0dc8364d365af42b48..aa2bc1cd6ab04e80d4ce4d9a71b3557547907dfe 100644 (file)
@@ -1,11 +1,22 @@
+# 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';
   }
 }
index ca1abdd26825344b2b95ef0d466ac43cea3d9409..8e361f796be7a2acded1e91bab73b809e837c29d 100644 (file)
@@ -13,11 +13,15 @@ define lighttpd::config::file(
     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 {