]> gitweb.fluxo.info Git - puppet-lighttpd.git/commitdiff
enable deployed configs on debian
authormh <mh@immerda.ch>
Sun, 21 Oct 2012 13:21:16 +0000 (15:21 +0200)
committermh <mh@immerda.ch>
Sun, 21 Oct 2012 13:21:16 +0000 (15:21 +0200)
manifests/config/file.pp

index 8e361f796be7a2acded1e91bab73b809e837c29d..95a596868e4ba99e2788e07532d4e8e29efd5900 100644 (file)
@@ -13,7 +13,7 @@ define lighttpd::config::file(
     mode    => '0644';
   }
 
-  case $operatingsystem {
+  case $::operatingsystem {
     centos,redhat,fedora: {
       file_line{$name:
         ensure  => $ensure,
@@ -22,6 +22,18 @@ define lighttpd::config::file(
         notify  => Service['lighttpd'],
       }
     }
+    debian,ubuntu: {
+      $link_ensure = $ensure ? {
+        'present' => 'link',
+        default   => $ensure
+      },
+      file{"/etc/lighttpd/conf-enabled/${name}.conf":
+        ensure  => $link_ensure,
+        target  => "${lighttpd::conf_dir}/${name}.conf",
+        require => Package['lighttpd'],
+        notify  => Service['lighttpd'];
+      }
+    }
   }
 
   case $content {