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

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

Issue 29691616: #5080 - Extend fileserver::repository to optionally create repository users (Closed)
Patch Set: Created Feb. 7, 2018, 2:48 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/eyeofiles.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/web/fileserver/repository.pp
diff --git a/modules/adblockplus/manifests/web/fileserver/repository.pp b/modules/adblockplus/manifests/web/fileserver/repository.pp
index f72a0e7e7c4cadb12042dbbc5681c2bfad3e91c6..bd809eb142da7c3f4c1b021852af4b98dc546d66 100644
--- a/modules/adblockplus/manifests/web/fileserver/repository.pp
+++ b/modules/adblockplus/manifests/web/fileserver/repository.pp
@@ -14,11 +14,13 @@
# Whether to set up the repository or not. Removing repositories is not
# supported.
#
-# Members are handled manually on the target server for now.
-# Figure out how to provision them some day.
+# [*users*]
+# System users that should be created and added to the group that has
+# write permissions for the repository directory
#
define adblockplus::web::fileserver::repository (
$ensure = 'present',
+ $users = {},
){
$repositories_directory = "$adblockplus::directory/fileserver"
@@ -39,6 +41,12 @@ define adblockplus::web::fileserver::repository (
],
}
+ ensure_resources(adblockplus::user, $users, {
mathias 2018/03/05 15:28:35 Please use quotes (') around the type name.
Fred 2018/03/08 09:16:11 Acknowledged.
+ ensure => $ensure,
+ password_hash => '*',
+ groups => ["www-$name"],
+ })
+
realize(File[$adblockplus::directory])
file {"/var/www/$repository_host":
« no previous file with comments | « hiera/roles/web/fileserver/eyeofiles.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld