]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Fix a2ensite/a2dissite invocation on wheezy
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Aug 2015 14:59:49 +0000 (11:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Aug 2015 14:59:49 +0000 (11:59 -0300)
manifests/site.pp

index 00d6f3cee913c43875d3a81964c8620adb96a709..f6cfef3fd3c1eb72423188a8d5f575d8f533ba70 100644 (file)
@@ -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"],