OLD | NEW |
1 # == Class: hgweb | 1 # == Class: hgweb |
2 # | 2 # |
3 # A hgweb server setup. | 3 # A hgweb server setup. |
4 # | 4 # |
5 # === Parameters: | 5 # === Parameters: |
6 # | 6 # |
7 # [*domain*] | 7 # [*domain*] |
8 # The auhority part of the URL the instance is associated with. | 8 # The auhority part of the URL the instance is associated with. |
9 # | 9 # |
10 # [*is_default*] | 10 # [*is_default*] |
11 # Whether the $domain shall become set up as default (or fallback) | 11 # Whether the $domain shall become set up as default (or fallback) |
12 # within the HTTP daemon. | 12 # within the HTTP daemon. |
13 # | 13 # |
14 # [*certificate*] | 14 # [*certificate*] |
15 # The name of the SSL certificate file within modules/private/files, if | 15 # The name of the SSL certificate file within modules/private/files, if |
16 # any. Requires a private_key as well. | 16 # any. Requires a private_key as well. |
17 # | 17 # |
18 # [*private_key*] | 18 # [*private_key*] |
19 # The name of the private key file within modules/private/files, if any. | 19 # The name of the private key file within modules/private/files, if any. |
20 # Requires a certificate as well. | 20 # Requires a certificate as well. |
21 # | 21 # |
22 # [*hgaccess*] | 22 # [*hgaccess*] |
23 # A prototype directory source for the hgaccess repository. | 23 # A prototype directory source for the hgaccess repository. |
24 # | 24 # |
25 # [*templates*] | 25 # [*templates*] |
26 # A directory providing custom /static/ resources to be used instead | 26 # A directory providing custom /static/ resources to be used instead |
27 # of the ones that ship with package mercurial. | 27 # of the ones that ship with package mercurial. |
28 # | 28 # |
| 29 # [*trac_abpbot_password*] |
| 30 # The password of the Trac user "abpbot", whose credentials are used to |
| 31 # interact with issues.adblockplus.org. |
| 32 # |
29 # === Examples: | 33 # === Examples: |
30 # | 34 # |
31 # class {'hgweb': | 35 # class {'hgweb': |
32 # domain => 'localhost', | 36 # domain => 'localhost', |
33 # } | 37 # } |
34 # | 38 # |
35 class hgweb( | 39 class hgweb( |
36 $domain, | 40 $domain, |
37 $is_default = false, | 41 $is_default = false, |
38 $certificate = hiera('hgweb::certificate', 'undef'), | 42 $certificate = hiera('hgweb::certificate', 'undef'), |
39 $private_key = hiera('hgweb::private_key', 'undef'), | 43 $private_key = hiera('hgweb::private_key', 'undef'), |
40 $hgaccess = 'puppet:///modules/hgweb/hgaccess', | 44 $hgaccess = 'puppet:///modules/hgweb/hgaccess', |
41 $templates = hiera('hgweb::templates', '/usr/share/mercurial/templates'), | 45 $templates = hiera('hgweb::templates', '/usr/share/mercurial/templates'), |
| 46 $trac_abpbot_password = hiera('hgweb::trac_abpbot_password', 'abpbot'), |
42 ) { | 47 ) { |
43 | 48 |
44 include ssh, nginx | 49 include ssh, nginx |
45 | 50 |
46 $required_packages = ['mercurial-common', 'python-flup', 'spawn-fcgi'] | 51 $required_packages = ['mercurial-common', 'python-flup', 'spawn-fcgi'] |
47 ensure_packages($required_packages) | 52 ensure_packages($required_packages) |
48 | 53 |
49 class {'sitescripts': | 54 class {'sitescripts': |
50 sitescriptsini_content => template('hgweb/sitescripts.ini.erb'), | 55 sitescriptsini_content => template('hgweb/sitescripts.ini.erb'), |
51 } | 56 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 content => template('hgweb/nginx.conf.erb'), | 188 content => template('hgweb/nginx.conf.erb'), |
184 is_default => $is_default, | 189 is_default => $is_default, |
185 global_config => template('hgweb/nginx_global.conf.erb'), | 190 global_config => template('hgweb/nginx_global.conf.erb'), |
186 log => 'access_log_hg', | 191 log => 'access_log_hg', |
187 private_key => $private_key ? { | 192 private_key => $private_key ? { |
188 'undef' => undef, | 193 'undef' => undef, |
189 default => $private_key, | 194 default => $private_key, |
190 }, | 195 }, |
191 } | 196 } |
192 } | 197 } |
OLD | NEW |