summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/templates
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-02 12:02:29 -0700
committerelijah <elijah@riseup.net>2014-06-02 12:03:06 -0700
commit455422ddd5152679eb8df5554e371dbcf2c28f27 (patch)
treef01d1d38ae6349806e85950bb03323adcac427be /puppet/modules/site_static/templates
parent0c4c0ab6863c4c1cf59d0e999c7ba7bd41d3546c (diff)
static site: better message for wrong location type.
Diffstat (limited to 'puppet/modules/site_static/templates')
-rw-r--r--puppet/modules/site_static/templates/apache.conf.erb4
1 files changed, 3 insertions, 1 deletions
diff --git a/puppet/modules/site_static/templates/apache.conf.erb b/puppet/modules/site_static/templates/apache.conf.erb
index a16d51f4..07ac481d 100644
--- a/puppet/modules/site_static/templates/apache.conf.erb
+++ b/puppet/modules/site_static/templates/apache.conf.erb
@@ -82,10 +82,12 @@
<%- location_path = location['path'].gsub(%r{^/|/$}, '') -%>
<%- directory = location_directory(name, location) -%>
<%- local_vars = {'location_path'=>location_path, 'directory'=>directory, 'location'=>location, 'name'=>name} -%>
+<%- template_path = File.join(File.dirname(__FILE__), location['format']) + '.erb' -%>
+<%- break unless File.exists?(template_path) -%>
##
## <%= name %> (<%= location['format'] %>)
##
-<%= scope.function_templatewlv([File.join(File.dirname(__FILE__), location['format']) + '.erb', local_vars]) %>
+<%= scope.function_templatewlv([template_path, local_vars]) %>
<%- end -%>
</VirtualHost>