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

Unified Diff: modules/adblockplus/manifests/web/fileserver/repository.pp

Issue 29767587: #10349 - Allow files in domain root directory (Closed)
Patch Set: Created May 1, 2018, 10:19 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 | « hiera/roles/web/fileserver/trusted-news.yaml ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/web/fileserver/repository.pp
===================================================================
--- a/modules/adblockplus/manifests/web/fileserver/repository.pp
+++ b/modules/adblockplus/manifests/web/fileserver/repository.pp
@@ -25,26 +25,33 @@
$repositories_directory = "$adblockplus::directory/fileserver"
$repository_directory = "$repositories_directory/$name"
- $repository_host = "$name.$adblockplus::web::fileserver::domain"
+ $repository_host = $name ? {
+ 'root' => "$adblockplus::web::fileserver::domain",
+ default => "$name.$adblockplus::web::fileserver::domain",
+ }
+ $group_name = $name ? {
+ 'root' => 'www',
+ default => "www-$name",
+ }
- group {"www-$name":
+ group {"$group_name":
ensure => $ensure,
}
file {"$repository_directory":
ensure => ensure_directory_state($ensure),
- group => "www-$name",
+ group => $group_name,
mode => '0775',
require => [
File["$repositories_directory"],
- Group["www-$name"],
+ Group[$group_name],
],
}
ensure_resources('adblockplus::user', $users, {
ensure => $ensure,
password_hash => '*',
- groups => ["www-$name"],
+ groups => [$group_name],
})
realize(File[$adblockplus::directory])
« no previous file with comments | « hiera/roles/web/fileserver/trusted-news.yaml ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld