]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Fix template deprecations
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Nov 2015 18:59:07 +0000 (16:59 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Nov 2015 18:59:07 +0000 (16:59 -0200)
templates/apache2.conf.jessie.erb
templates/apache2.conf.trusty.erb
templates/apache2.conf.wheezy.erb
templates/default.erb
templates/error.erb
templates/site.erb

index 0fc143b1900824b3156de956e184dc7c4e707fb5..b68f8226f4f90d62de8468d2bbb6695f5be8d6fd 100644 (file)
@@ -35,7 +35,7 @@
 # such as the number of concurrent requests it can handle or where it
 # can find its configuration files.
 #
-ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %>
+ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %>
 
 #
 # ServerRoot: The top of the directory tree under which the server's
@@ -123,8 +123,8 @@ KeepAliveTimeout 15
     MaxRequestsPerChild   0
 </IfModule>
 
-User <%= default_user %>
-Group <%= default_group %>
+User <%= @default_user %>
+Group <%= @default_group %>
 
 #
 # AccessFileName: The name of the file to look for in each directory
@@ -455,7 +455,7 @@ ServerSignature Off
 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
 #ErrorDocument 402 http://www.example.com/subscription_info.html
 #
-ErrorDocument 404 http://<%= domain %>/missing.html
+ErrorDocument 404 http://<%= @domain %>/missing.html
 
 #
 # Putting this all together, we can internationalize error responses.
index 0fc143b1900824b3156de956e184dc7c4e707fb5..b68f8226f4f90d62de8468d2bbb6695f5be8d6fd 100644 (file)
@@ -35,7 +35,7 @@
 # such as the number of concurrent requests it can handle or where it
 # can find its configuration files.
 #
-ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %>
+ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %>
 
 #
 # ServerRoot: The top of the directory tree under which the server's
@@ -123,8 +123,8 @@ KeepAliveTimeout 15
     MaxRequestsPerChild   0
 </IfModule>
 
-User <%= default_user %>
-Group <%= default_group %>
+User <%= @default_user %>
+Group <%= @default_group %>
 
 #
 # AccessFileName: The name of the file to look for in each directory
@@ -455,7 +455,7 @@ ServerSignature Off
 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
 #ErrorDocument 402 http://www.example.com/subscription_info.html
 #
-ErrorDocument 404 http://<%= domain %>/missing.html
+ErrorDocument 404 http://<%= @domain %>/missing.html
 
 #
 # Putting this all together, we can internationalize error responses.
index 886b305845c889cef078147913c43915d48ea4d5..13c4797e263bb90aba5ecd36a2c7b1be9812f07c 100644 (file)
@@ -35,7 +35,7 @@
 # such as the number of concurrent requests it can handle or where it
 # can find its configuration files.
 #
-ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %>
+ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %>
 
 #
 # ServerRoot: The top of the directory tree under which the server's
@@ -123,8 +123,8 @@ KeepAliveTimeout 15
     MaxRequestsPerChild   0
 </IfModule>
 
-User <%= default_user %>
-Group <%= default_group %>
+User <%= @default_user %>
+Group <%= @default_group %>
 
 #
 # AccessFileName: The name of the file to look for in each directory
@@ -455,7 +455,7 @@ ServerSignature Off
 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
 #ErrorDocument 402 http://www.example.com/subscription_info.html
 #
-ErrorDocument 404 http://<%= domain %>/missing.html
+ErrorDocument 404 http://<%= @domain %>/missing.html
 
 #
 # Putting this all together, we can internationalize error responses.
index 90e4801b4adcf044a765e21f8dab09eb577389f4..b2af2e7d2adb61accf472c9b6860467d65a0c517 100644 (file)
@@ -1,4 +1,4 @@
-# begin vhost for <%= fqdn %>
+# begin vhost for <%= @fqdn %>
 <VirtualHost *:<%= scope.lookupvar('apache::http_port') %>>
    ServerName <%= fqdn %>
    DocumentRoot <%= scope.lookupvar('apache::default_folder') %>
@@ -11,4 +11,4 @@
    # end site config
                                 
 </VirtualHost>
-# end vhost for <%= fqdn %>
+# end vhost for <%= @fqdn %>
index 4e13d60e4d97652e3ae45fc77b886ce6a172a145..27a2c8e18cf260e7dfe65c5f23e2abfff4432dfc 100644 (file)
@@ -1,7 +1,7 @@
 # vhost to handle inexistent vhosts
 <VirtualHost *:<%= scope.lookupvar('apache::http_port') %>>
-  ServerName error.<%= hosting_domain %>
-  ServerAlias *.<%= hosting_domain %>
+  ServerName error.<%= @hosting_domain %>
+  ServerAlias *.<%= @hosting_domain %>
   DocumentRoot <%= scope.lookupvar('apache::error_folder') %>
   ErrorDocument 404 <%= scope.lookupvar('apache::error_dest') %>
 
index dd6c243b2417d891a33851ab573d065a70da224a..e2ebbf59ed9700aa592ce7a7c0932a831a960378 100644 (file)
@@ -1,63 +1,63 @@
-# begin vhost for <%= title %>
-<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::http_port') %>>
-   ServerName <%= title %>.<%= hosting_domain %>
-<% if server_alias != false %>   ServerAlias <%= server_alias %><% end %>
-   DocumentRoot <%= docroot %>
-<% if https_redirect != false or canonical != false %>
+# begin vhost for <%= @title %>
+<VirtualHost <%= @listen %>:<%= scope.lookupvar('apache::http_port') %>>
+   ServerName <%= @title %>.<%= @hosting_domain %>
+<% if @server_alias != false %>   ServerAlias <%= @server_alias %><% end %>
+   DocumentRoot <%= @docroot %>
+<% if @https_redirect != false or @canonical != false %>
    RewriteEngine On
 <% end -%>
-<% if https_redirect != false %>
+<% if @https_redirect != false %>
    # Redirect all HTTP to HTTPS
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [redirect=301]<% end %>
-<% if redirect_match != false %>   RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %>
-<% if redirect != false %>   Redirect <%= redirect %><% end %>
-<% if aliases != false %><% aliases.each do |map| -%>
+<% if @redirect_match != false %>   RedirectMatch ^/$ <%= @protocol %>://<%= @title %>.<%= @hosting_domain %>/<%= @redirect_match %><% end %>
+<% if @redirect != false %>   Redirect <%= @redirect %><% end %>
+<% if @aliases != false %><% @aliases.each do |map| -%>
    Alias <%= map %>
 <% end -%><% end -%>  
-<% if use != false %><% use.each do |instance| -%>
+<% if @use != false %><% @use.each do |instance| -%>
    Use <%= instance %>
 <% end -%><% end -%>
-<% if mpm == true %>
+<% if @mpm == true %>
    <IfModule mpm_itk_module>
-     AssignUserId <%= user %> <%= gid %>
+     AssignUserId <%= @user %> <%= @gid %>
    </IfModule>
 <% end %>   
-<% if canonical != false %>
-   <%- for canonical_exception in canonical_exceptions -%>
+<% if @canonical != false %>
+   <%- for canonical_exception in @canonical_exceptions -%>
    RewriteCond %{HTTP_HOST}   !=<%= canonical_exception %> [NC]
    <%- end -%>
-   RewriteCond %{HTTP_HOST}   !=<%= canonical %> [NC]
+   RewriteCond %{HTTP_HOST}   !=<%= @canonical %> [NC]
    RewriteCond %{HTTP_HOST}   !=""
-   RewriteRule ^/(.*)         <%= protocol %>://<%= canonical %>/$1 [L,R=301]
+   RewriteRule ^/(.*)         <%= @protocol %>://<%= @canonical %>/$1 [L,R=301]
 <% end %>
-<% if custom_directives != false -%>
-   <%= custom_directives %>
+<% if @custom_directives != false -%>
+   <%= @custom_directives %>
 <% end -%>
 </VirtualHost>
-# end vhost for <%= title %>
-<% if ssl == true %>
-# begin ssl vhost for <%= title %>
-<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::https_port') %>>
+# end vhost for <%= @title %>
+<% if @ssl == true %>
+# begin ssl vhost for <%= @title %>
+<VirtualHost <%= @listen %>:<%= scope.lookupvar('apache::https_port') %>>
    # Use HTTP Strict Transport Security to force client to use secure connections only
    Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
 
-   ServerName <%= title %>.<%= hosting_domain %>
-<% if server_alias != false %>   ServerAlias <%= server_alias %><% end %>
-   DocumentRoot <%= docroot %>
-<% if redirect_match != false %>   RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %>
-<% if redirect != false %>   Redirect <%= redirect %><% end %>
-<% if aliases != false %><% aliases.each do |map| -%>
-   Alias <%= map %>
+   ServerName <%= @title %>.<%= @hosting_domain %>
+<% if @server_alias != false %>   ServerAlias <%= @server_alias %><% end %>
+   DocumentRoot <%= @docroot %>
+<% if @redirect_match != false %>   RedirectMatch ^/$ <%= @protocol %>://<%= @title %>.<%= @hosting_domain %>/<%= @redirect_match %><% end %>
+<% if @redirect != false %>   Redirect <%= @redirect %><% end %>
+<% if @aliases != false %><% aliases.each do |map| -%>
+   Alias <%= @map %>
 <% end -%><% end -%>  
-<% if use != false %><% use.each do |instance| -%>
+<% if @use != false %><% @use.each do |instance| -%>
    Use <%= instance %>
 <% end -%><% end -%>
-<% if custom_directives != false -%>
-  <%= custom_directives %>
+<% if @custom_directives != false -%>
+  <%= @custom_directives %>
 <% end -%>
-<% if mpm == true %>
+<% if @mpm == true %>
    <IfModule mpm_itk_module>
-     AssignUserId <%= user %> <%= gid %>
+     AssignUserId <%= @user %> <%= @gid %>
    </IfModule>
 <% end %>
    # SSL Configuration
@@ -66,8 +66,8 @@
    SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:!RC4:HIGH:!MD5:!aNULL:!EDH
    SSLHonorCipherOrder on
    SSLCompression off
-   SSLCertificateFile    /etc/ssl/certs/<%= title %>.crt
-   SSLCertificateKeyFile /etc/ssl/private/<%= title %>.pem
+   SSLCertificateFile    /etc/ssl/certs/<%= @title %>.crt
+   SSLCertificateKeyFile /etc/ssl/private/<%= @title %>.pem
 </VirtualHost>
-# end ssl vhost for <%= title %>
-<% end %>   
+# end ssl vhost for <%= @title %>
+<% end %>