]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
apache 2.4 sites stuff
authorPeter Palfrader <peter@palfrader.org>
Sat, 7 Feb 2015 18:11:28 +0000 (19:11 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sat, 7 Feb 2015 18:11:28 +0000 (19:11 +0100)
modules/apache2/manifests/site.pp

index 4588a60242e707202e15557c8fd5d1aef55a89bf..9ab7635159c0d02f089d349b88017910df73ccb9 100644 (file)
@@ -46,14 +46,25 @@ define apache2::site (
                }
        }
 
-       if $ensure == present {
+       if $::lsbmajdistrelease <= 7 {
+               $symlink = "/etc/apache2/sites-enabled/${name}":
+       } else {
+               $symlink = "/etc/apache2/sites-enabled/${name}.conf":
+
                file { "/etc/apache2/sites-enabled/${name}":
+                       ensure => absent,
+                       notify => Service['apache2'],
+               }
+       }
+
+       if $ensure == present {
+               file { $symlink:
                        ensure => link,
                        target => $link_target,
                        notify => Service['apache2'],
                }
        } else {
-               file { "/etc/apache2/sites-enabled/${name}":
+               file { $symlink:
                        ensure => absent,
                        notify => Service['apache2'],
                }