]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Fix: cleanup macro definitions
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 5 Dec 2020 17:23:53 +0000 (14:23 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 5 Dec 2020 17:23:53 +0000 (14:23 -0300)
templates/macros.erb

index 3b5f9e3932f2c2ba89e6d08c3ee16194d2821561..2c041177d6e50bfe9496c0acf536c8a2e4d43344 100644 (file)
    # end wiki config
 </Macro>
 
-<Macro Site $name>
-   # begin site config
-   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/site>
+<Macro DirectoryAllowAll $name $folder>
+   # begin $name config
+   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/$folder>
       Options Indexes Includes FollowSymLinks MultiViews
       AllowOverride All
       Require all granted
    </Directory>
-   # end site config
+   # end $name config
+</Macro>
+
+<Macro Site $name>
+   Use DirectoryAllowAll $name site
 </Macro>
 
 <Macro Www $name>
-   # begin site config
-   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/www>
-      Options Indexes Includes FollowSymLinks MultiViews
-      AllowOverride All
-      Require all granted
-   </Directory>
-   # end site config
+   Use DirectoryAllowAll $name www
 </Macro>
 
 <Macro Web $name>
-   # begin site config
-   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/web>
-      Options Indexes Includes FollowSymLinks MultiViews
-      AllowOverride All
-      Require all granted
-   </Directory>
-   # end site config
+   Use DirectoryAllowAll $name web
 </Macro>
 
 <Macro Src $name>
-   # begin site config
-   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/src>
-      Options Indexes Includes FollowSymLinks MultiViews
-      AllowOverride All
-      Require all granted
-   </Directory>
-   # end site config
+   Use DirectoryAllowAll $name src
 </Macro>
 
 <Macro Html $name>
-   # begin site config
-   <Directory <%= scope.lookupvar('apache::sites_folder') %>/$name/html>
-      Options Indexes Includes FollowSymLinks MultiViews
-      AllowOverride All
-      Require all granted
-   </Directory>
-   # end site config
+   Use DirectoryAllowAll $name html
 </Macro>
 
 <Macro Trac $site>