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

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

Issue 29795567: #11371 - Password protection for fileserver repositories (Closed)
Left Patch Set: Uploaded a file by mistake Created June 1, 2018, 5:02 p.m.
Right Patch Set: For comment 7 Created June 5, 2018, 6:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 #
7 # [*domain*]
8 # A string which is the name of the fileserver domain, under which
9 # each repository has a subdomain.
6 # 10 #
7 # [*certificate*] 11 # [*certificate*]
8 # The name of the SSL certificate file within modules/private/files, if any. 12 # The name of the SSL certificate file within modules/private/files, if any.
9 # Requires a private_key as well. 13 # Requires a private_key as well.
10 # 14 #
11 # [*private_key*] 15 # [*private_key*]
12 # The name of the private key file within modules/private/files, if any. 16 # The name of the private key file within modules/private/files, if any.
13 # Requires a certificate as well. 17 # Requires a certificate as well.
14 # 18 #
15 # [*repositories*] 19 # [*repositories*]
16 # A collection (hash) of repositories to serve. 20 # A collection (hash) of repositories to serve.
17 # The contents of a repository is served on a subdomain of the fileserver. 21 # The contents of a repository is served on a subdomain of the fileserver.
18 # 22 #
19 class adblockplus::web::fileserver( 23 class adblockplus::web::fileserver(
20 $ensure = 'present', 24 $ensure = 'present',
25 $domain,
21 $certificate = undef, 26 $certificate = undef,
22 $private_key = undef, 27 $private_key = undef,
23 $repositories={}, 28 $repositories={},
24 ){ 29 ){
25 30
26 include nginx 31 include nginx
27 include adblockplus 32 include adblockplus
28 include adblockplus::web 33 include adblockplus::web
29 34
30 realize(File[$adblockplus::directory]) 35 realize(File[$adblockplus::directory])
31 36
32 file {"$adblockplus::directory/fileserver": 37 file {"$adblockplus::directory/fileserver":
33 ensure => directory, 38 ensure => directory,
34 } 39 }
35 40
41 file {"${::adblockplus::directory}/htpasswd":
42 ensure => directory,
43 }
44
36 ensure_resources('adblockplus::web::fileserver::repository', $repositories, { 45 ensure_resources('adblockplus::web::fileserver::repository', $repositories, {
37 ensure => 'present', 46 ensure => 'present',
38 }) 47 })
39 } 48 }
40 49
LEFTRIGHT

Powered by Google App Engine
This is Rietveld