X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fapache2%2Fmanifests%2Fsite.pp;h=46ec1bf756faa69e319e5a35080bfc11b9c1a5f2;hb=10f12a50c9f976c27b1bcd58157778fbbd871328;hp=4588a60242e707202e15557c8fd5d1aef55a89bf;hpb=be87d13ce2fbaf73cf58cd9955f39f51aabdb773;p=mirror%2Fdsa-puppet.git diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 4588a6024..46ec1bf75 100644 --- a/modules/apache2/manifests/site.pp +++ b/modules/apache2/manifests/site.pp @@ -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'], }