diff options
-rw-r--r-- | manifests/init.pp | 5 | ||||
-rw-r--r-- | templates/site.erb | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index edd84a8..cdd4d6e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -92,9 +92,8 @@ class apache { '': { $apache_error_dest = "${apache_error_folder}/index.html" } } - $use_domain = $apache_use_domain ? { - '' => $domain, - default => $apache_use_domain, + case $apache_use_domain { + '' { $apache_use_domain = $domain } } define site($ensure = present, $docroot = false, $redirect = false, diff --git a/templates/site.erb b/templates/site.erb index f75c81a..56cc929 100644 --- a/templates/site.erb +++ b/templates/site.erb @@ -1,9 +1,9 @@ # begin vhost for <%= title %> <VirtualHost *:80> - ServerName <%= title %>.<%= use_domain %> + ServerName <%= title %>.<%= apache_use_domain %> <% if server_alias != false %> ServerAlias <%= server_alias %><% end %> DocumentRoot <%= docroot %> -<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= use_domain %>/<%= redirect_match %><% end %> +<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= apache_use_domain %>/<%= redirect_match %><% end %> <% if redirect != false %> Redirect <%= redirect %><% end %> <% if use != false %><% use.each do |instance| -%> Use <%= instance %> |