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

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

Issue 29795567: #11371 - Password protection for fileserver repositories (Closed)
Patch Set: Created May 31, 2018, 4:19 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
1 # == Class: adblockplus::web::fileserver 1 # == Class: adblockplus::web::fileserver
2 # 2 #
3 # A fileserver serves multiple file repositories. 3 # A fileserver serves multiple file repositories.
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*domain*]
8 # A string which is the name of the fileserver domain, under which
9 # each repository has a subdomain.
10 #
11 # [*certificate*] 7 # [*certificate*]
12 # The name of the SSL certificate file within modules/private/files, if any. 8 # The name of the SSL certificate file within modules/private/files, if any.
13 # Requires a private_key as well. 9 # Requires a private_key as well.
14 # 10 #
15 # [*private_key*] 11 # [*private_key*]
16 # The name of the private key file within modules/private/files, if any. 12 # The name of the private key file within modules/private/files, if any.
17 # Requires a certificate as well. 13 # Requires a certificate as well.
18 # 14 #
19 # [*is_default*]
20 # Passed on to nginx (whether or not the site config should be default).
21 #
22 # [*repositories*] 15 # [*repositories*]
23 # A collection (hash) of repositories to serve. 16 # A collection (hash) of repositories to serve.
24 # The contents of a repository is served on a subdomain of the fileserver. 17 # The contents of a repository is served on a subdomain of the fileserver.
25 # 18 #
26 class adblockplus::web::fileserver( 19 class adblockplus::web::fileserver(
27 $ensure = 'present', 20 $ensure = 'present',
28 $domain,
29 $certificate = undef, 21 $certificate = undef,
30 $private_key = undef, 22 $private_key = undef,
31 $repositories={}, 23 $repositories={},
32 ){ 24 ){
33 25
34 include nginx 26 include nginx
35 include adblockplus 27 include adblockplus
36 include adblockplus::web 28 include adblockplus::web
37 29
38 realize(File[$adblockplus::directory]) 30 realize(File[$adblockplus::directory])
39 31
40 file {"$adblockplus::directory/fileserver": 32 file {"$adblockplus::directory/fileserver":
41 ensure => directory, 33 ensure => directory,
42 } 34 }
43 35
44 ensure_resources('adblockplus::web::fileserver::repository', $repositories, { 36 ensure_resources('adblockplus::web::fileserver::repository', $repositories, {
45 ensure => 'present', 37 ensure => 'present',
46 }) 38 })
47
48 nginx::hostconfig{ "$domain":
49 source => 'puppet:///modules/adblockplus/nginx/fileserver.conf',
50 is_default => true,
51 certificate => $certificate,
52 private_key => $private_key,
53 log => 'access_log_fileserver',
54 }
55 } 39 }
56 40
OLDNEW
« no previous file with comments | « hiera/roles/web/adblockbrowser.yaml ('k') | modules/adblockplus/manifests/web/fileserver/repository.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld