Index: modules/web/manifests/server.pp |
diff --git a/modules/web/manifests/server.pp b/modules/web/manifests/server.pp |
index ac1b45b40696fd60fae92a670f4d8a4efd0f1db1..31cc5fc2c10f55627814ca5403cd748e5807419b 100644 |
--- a/modules/web/manifests/server.pp |
+++ b/modules/web/manifests/server.pp |
@@ -10,6 +10,11 @@ class web::server( |
$geoip = false, |
) { |
+ # Ensure there is at least one character in the respective strings; |
+ # see https://codereview.adblockplus.org/29329028/#msg3 |
+ validate_re($vhost, '.+') |
+ validate_re($repository, '.+') |
+ |
File { |
owner => 'root', |
group => 'root', |
@@ -94,7 +99,10 @@ class web::server( |
mode => 755, |
} |
- file {"/var/www/${vhost}": |
+ file {[ |
+ "/var/cache/${repository}", |
+ "/var/www/${vhost}", |
+ ]: |
ensure => directory, |
owner => www, |
mode => 755, |