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

Side by Side Diff: modules/adblockplus/manifests/web/fileserver/repository.pp

Issue 29551585: #2317 - provide role fileserver for eyeofiles.com (Closed) Base URL: https://hg1/infrastructure
Patch Set: replace hardcoded repository with definition Created Sept. 21, 2017, 9:34 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # == Type: adblockplus::web::fileserver::repository
2 #
3 # Manage a repository in a filterserver.
4 #
5 # A repository is a directory where a group of people can place files.
6 # The directory is linked into /var/www so that the files can be downloaded.
7 #
8 # The directory and the group have the same name.
9 #
10 # === parameters:
11 #
12 # [*ensure*]
13 # Whether to set up the repository or not. Removing repositories is not suppor ted.
14 #
15 define adblockplus::web::fileserver::repository (
mathias 2017/09/22 07:00:15 Why ::repository? This is rather misleading. Or do
f.nicolaisen 2017/09/22 07:57:44 Since I don't know where this is going to end up,
16 $ensure = 'present',
17 ){
18
19 $repositories_directory = "$adblockplus::directory/fileserver/repositories"
20
21 if $ensure !~ /^(absent|purged)$/ {
22 group {"www-$name":
23 ensure => present,
24 # TODO Members are handled manually on the target server for now. Should g o into configuration.
25 }
26
27 # (2) create the repository folder
28 file {"$repositories_directory/$name":
29 ensure => directory,
30 group => "www-$name",
31 mode => '0775',
32 require => [
33 File["$repositories_directory"],
34 Group["www-$name"],
35 ],
36 }
37
38 # (3) symlink the repository into www:
39 file {"/var/www/$name":
40 ensure => link,
41 target => "$repositories_directory/$name",
42 require => [
43 File["$repositories_directory/$name"],
44 Package['nginx'],
45 ],
46 }
47 }
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld