summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/manifests
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/manifests
parent0c4c0ab6863c4c1cf59d0e999c7ba7bd41d3546c (diff)
static site: better message for wrong location type.
Diffstat (limited to 'puppet/modules/site_static/manifests')
-rw-r--r--puppet/modules/site_static/manifests/location.pp6
1 files changed, 4 insertions, 2 deletions
diff --git a/puppet/modules/site_static/manifests/location.pp b/puppet/modules/site_static/manifests/location.pp
index 9c749b00..ce2af9af 100644
--- a/puppet/modules/site_static/manifests/location.pp
+++ b/puppet/modules/site_static/manifests/location.pp
@@ -1,13 +1,15 @@
define site_static::location($path, $format, $source) {
$file_path = "/srv/static/${name}"
+ $allowed_formats = ['amber','rack']
if $format == undef {
fail("static_site location `${path}` is missing `format` field.")
}
- if ! member(['amber','rack'], $format) {
- fail("Could not understand static_site location format `${format}`.")
+ if ! member($allowed_formats, $format) {
+ $formats_str = join($allowed_formats, ', ')
+ fail("Unsupported static_site location format `${format}`. Supported formats include ${formats_str}.")
}
if ($format == 'amber') {