]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
add '.conf' in site conf file names
authordrebs <drebs@riseup.net>
Fri, 5 Jun 2015 18:43:18 +0000 (15:43 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 31 Jul 2015 20:16:40 +0000 (17:16 -0300)
manifests/site.pp

index 7877460349c8cc8b0594a88bae93be46cc1f53f0..231a32645e7ee3affa1c5e765722a3eff93774ec 100644 (file)
@@ -117,7 +117,7 @@ define apache::site(
 
   case $source {
     true: {
-             file { "${apache::sites}-available/$vhost":
+             file { "${apache::sites}-available/$vhost.conf":
                ensure  => $ensure,
                source  => [ "puppet:///modules/site_apache/vhosts/$domain/$title",
                             "puppet:///modules/site_apache/vhosts/$title" ],
@@ -129,7 +129,7 @@ define apache::site(
              }
            }
     false: {
-             file { "${apache::sites}-available/$vhost":
+             file { "${apache::sites}-available/$vhost.conf":
                ensure  => $ensure,
                content => template("$template"),
                owner   => root,
@@ -179,19 +179,19 @@ define apache::site(
         }
       }
       exec { "/usr/sbin/a2ensite $vhost":
-        unless  => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost ] \
-                && [ ${apache::sites}-enabled/$vhost -ef ${apache::sites}-available/$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"],
       }
     }
     'absent': {
       exec { "/usr/sbin/a2dissite $vhost":
-        onlyif  => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost ] \
-                && [ ${apache::sites}-enabled/$vhost -ef ${apache::sites}-available/$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"],
       }
 
-      file { "${apache::sites}-enabled/$vhost":
+      file { "${apache::sites}-enabled/$vhost.conf":
         ensure => absent,
         notify => Exec["reload-apache2"],
       }