Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/web/manifests/server.pp

Issue 29329028: Issue 3190 - Ensure /var/cache/$cms_repository being present and writable (Closed)
Patch Set: Issue 3190 - Address feedback from codereview Created Oct. 12, 2015, 1:32 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld