Fix apache2/jessie conf-enabled symlinks
authorPeter Palfrader <peter@palfrader.org>
Tue, 23 Dec 2014 12:19:19 +0000 (12:19 +0000)
committerPeter Palfrader <peter@palfrader.org>
Tue, 23 Dec 2014 12:19:19 +0000 (12:19 +0000)
modules/apache2/manifests/config.pp

index f44dc01..4faa33f 100644 (file)
@@ -49,14 +49,14 @@ define apache2::config (
                        }
                }
 
-               $link_ensure = $ensure == present ? {
-                       present => 'link',
-                       absent  => 'absent'
+               $link_ensure = $ensure ? {
+                       present => link,
+                       absent  => absent
                }
 
-               file { "/etc/apache2/conf-enabled/${name}":
+               file { "/etc/apache2/conf-enabled/${name}.conf":
                        ensure => $link_ensure,
-                       target => "/etc/apache2/conf-available/${base}.conf",
+                       target => "../conf-available/${name}.conf",
                        notify => Service['apache2'],
                }
        }