From: Peter Palfrader Date: Sat, 7 Feb 2015 18:11:28 +0000 (+0100) Subject: apache 2.4 sites stuff X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5b9ac527598f1f41caaeec5a6e31376738c0508f;p=mirror%2Fdsa-puppet.git apache 2.4 sites stuff --- diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 4588a6024..9ab763515 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'], }