diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-08-02 11:59:49 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-08-02 11:59:49 -0300 |
commit | 0e9cd07371336f5f7aa620fa7a996daeb7f79480 (patch) | |
tree | 284edf50b6ffbf6f75f5712d1afb7e4ec1618cfa | |
parent | 150d2fb83234bca36ef37a25dfb18ca6086494b5 (diff) | |
download | puppet-apache-0e9cd07371336f5f7aa620fa7a996daeb7f79480.tar.gz puppet-apache-0e9cd07371336f5f7aa620fa7a996daeb7f79480.tar.bz2 |
Fix a2ensite/a2dissite invocation on wheezy
-rw-r--r-- | manifests/site.pp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/site.pp b/manifests/site.pp index 00d6f3c..f6cfef3 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -150,11 +150,11 @@ define apache::site( # Enable the site without a2ensite # #$status = $ensure ? { - # 'present' => "${apache::sites}-available/$vhost", + # 'present' => "${apache::sites}-available/$vhost.conf", # default => 'absent', #} # - #file { "/etc/apache2/sites-enabled/$title": + #file { "/etc/apache2/sites-enabled/$vhost.conf": # ensure => $status, # owner => root, # group => root, @@ -185,6 +185,10 @@ define apache::site( } } exec { "/usr/sbin/a2ensite $vhost": + command => $::lsbdistcodename ? { + 'wheezy' => "/usr/sbin/a2ensite $vhost.conf", + default => "/usr/sbin/a2ensite $vhost", + }, unless => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \ && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'", notify => Exec["reload-apache2"], @@ -192,6 +196,10 @@ define apache::site( } 'absent': { exec { "/usr/sbin/a2dissite $vhost": + command => $::lsbdistcodename ? { + 'wheezy' => "/usr/sbin/a2dissite $vhost.conf", + default => "/usr/sbin/a2dissite $vhost", + }, onlyif => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \ && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'", notify => Exec["reload-apache2"], |