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

Delta Between Two Patch Sets: modules/adblockplus/manifests/web/fileserver/repository.pp

Issue 29551585: #2317 - provide role fileserver for eyeofiles.com (Closed) Base URL: https://hg1/infrastructure
Left Patch Set: move into adblockplus::web namespace and other improvements Created Sept. 21, 2017, 8:37 p.m.
Right Patch Set: more flexible resource definitions Created Sept. 25, 2017, 9:18 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « modules/adblockplus/manifests/web/fileserver.pp ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # == Type: adblockplus::web::fileserver::repository
2 #
3 # Manage a repository on a fileserver.
4 #
5 # A repository is a site where a group of people can upload and artifacts.
6 #
7 # In its current form, a repository is simply a directory exposed on a web
8 # server. This may evolve to make use of more advanced repositories in the
9 # future (proxy to repository manager, or 3rd-party service, etc).
10 #
11 # === parameters:
12 #
13 # [*ensure*]
14 # Whether to set up the repository or not. Removing repositories is not
15 # supported.
16 #
17 # Members are handled manually on the target server for now.
18 # Figure out how to provision them some day.
19 #
20 define adblockplus::web::fileserver::repository (
21 $ensure = 'present',
22 ){
23
24 $repositories_directory = "$adblockplus::directory/fileserver"
25 $repository_directory = "$repositories_directory/$name"
26 $repository_host = "$name.$adblockplus::web::fileserver::domain"
27
28 group {"www-$name":
29 ensure => $ensure,
30 }
31
32 file {"$repository_directory":
33 ensure => ensure_directory_state($ensure),
34 group => "www-$name",
35 mode => '0775',
36 require => [
37 File["$repositories_directory"],
38 Group["www-$name"],
39 ],
40 }
41
42 realize(File[$adblockplus::directory])
43
44 file {"/var/www/$repository_host":
45 ensure => ensure_symlink_state($ensure),
46 target => "$repository_directory",
47 require => File["$repository_directory"],
48 }
49 }
50
LEFTRIGHT

Powered by Google App Engine
This is Rietveld