| 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*] |
| 26 # A directory providing custom /static/ resources to be used instead |
| 27 # of the ones that ship with package mercurial. |
| 28 # |
| 25 # === Examples: | 29 # === Examples: |
| 26 # | 30 # |
| 27 # class {'hgweb': | 31 # class {'hgweb': |
| 28 # domain => 'localhost', | 32 # domain => 'localhost', |
| 29 # } | 33 # } |
| 30 # | 34 # |
| 31 class hgweb( | 35 class hgweb( |
| 32 $domain, | 36 $domain, |
| 33 $is_default = false, | 37 $is_default = false, |
| 34 $certificate = hiera('hgweb::certificate', 'undef'), | 38 $certificate = hiera('hgweb::certificate', 'undef'), |
| 35 $private_key = hiera('hgweb::private_key', 'undef'), | 39 $private_key = hiera('hgweb::private_key', 'undef'), |
| 36 $hgaccess = 'puppet:///modules/hgweb/hgaccess', | 40 $hgaccess = 'puppet:///modules/hgweb/hgaccess', |
| 41 $templates = hiera('hgweb::templates', '/usr/share/mercurial/templates'), |
| 37 ) { | 42 ) { |
| 38 | 43 |
| 39 include ssh, nginx | 44 include ssh, nginx |
| 40 | 45 |
| 41 $required_packages = ['mercurial-common', 'python-flup', 'spawn-fcgi'] | 46 $required_packages = ['mercurial-common', 'python-flup', 'spawn-fcgi'] |
| 42 ensure_packages($required_packages) | 47 ensure_packages($required_packages) |
| 43 | 48 |
| 44 class {'sitescripts': | 49 class {'sitescripts': |
| 45 sitescriptsini_content => template('hgweb/sitescripts.ini.erb'), | 50 sitescriptsini_content => template('hgweb/sitescripts.ini.erb'), |
| 46 } | 51 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 source => 'puppet:///modules/hgweb/nginx.conf', | 179 source => 'puppet:///modules/hgweb/nginx.conf', |
| 175 is_default => $is_default, | 180 is_default => $is_default, |
| 176 global_config => template('hgweb/nginx_global.conf.erb'), | 181 global_config => template('hgweb/nginx_global.conf.erb'), |
| 177 log => 'access_log_hg', | 182 log => 'access_log_hg', |
| 178 private_key => $private_key ? { | 183 private_key => $private_key ? { |
| 179 'undef' => undef, | 184 'undef' => undef, |
| 180 default => $private_key, | 185 default => $private_key, |
| 181 }, | 186 }, |
| 182 } | 187 } |
| 183 } | 188 } |
| OLD | NEW |