| LEFT | RIGHT |
| 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*] |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 require => Package[$required_packages], | 145 require => Package[$required_packages], |
| 146 source => 'puppet:///modules/hgweb/hgweb.ini', | 146 source => 'puppet:///modules/hgweb/hgweb.ini', |
| 147 } | 147 } |
| 148 | 148 |
| 149 file {'/opt/hgweb.fcgi': | 149 file {'/opt/hgweb.fcgi': |
| 150 mode => 755, | 150 mode => 755, |
| 151 require => File['/etc/hgweb.ini'], | 151 require => File['/etc/hgweb.ini'], |
| 152 source => 'puppet:///modules/hgweb/hgweb.fcgi', | 152 source => 'puppet:///modules/hgweb/hgweb.fcgi', |
| 153 } | 153 } |
| 154 | 154 |
| 155 if $::operatingsystem == "Ubuntu" { | 155 if $::operatingsystem == "Debian" { |
| 156 file {'init_script': |
| 157 name => '/etc/systemd/system/hgweb.service', |
| 158 mode => 755, |
| 159 require => File['/opt/hgweb.fcgi'], |
| 160 source => 'puppet:///modules/hgweb/hgweb.service', |
| 161 } |
| 162 } else { |
| 156 file {'init_script': | 163 file {'init_script': |
| 157 name => '/etc/init.d/hgweb', | 164 name => '/etc/init.d/hgweb', |
| 158 mode => 755, | 165 mode => 755, |
| 159 require => File['/opt/hgweb.fcgi'], | 166 require => File['/opt/hgweb.fcgi'], |
| 160 source => 'puppet:///modules/hgweb/hgweb.sh', | 167 source => 'puppet:///modules/hgweb/hgweb.sh', |
| 161 } | |
| 162 } elsif $::operatingsystem == "Debian" { | |
| 163 file {'init_script': | |
| 164 name => '/etc/systemd/system/hgweb.service', | |
| 165 mode => 755, | |
| 166 require => File['/opt/hgweb.fcgi'], | |
| 167 source => 'puppet:///modules/hgweb/hgweb.service', | |
| 168 } -> | |
| 169 | |
| 170 exec {'enable_initscript': | |
| 171 command => '/bin/systemctl enable hgweb.service', | |
| 172 user => root, | |
| 173 } -> | |
| 174 | |
| 175 exec {'reload_daemon': | |
| 176 command => '/bin/systemctl daemon-reload', | |
| 177 user => root, | |
| 178 } | 168 } |
| 179 } | 169 } |
| 180 | 170 |
| 181 file {'/home/hg/web/robots.txt': | 171 file {'/home/hg/web/robots.txt': |
| 182 group => 'hg', | 172 group => 'hg', |
| 183 mode => 0644, | 173 mode => 0644, |
| 184 owner => 'hg', | 174 owner => 'hg', |
| 185 require => File['/home/hg/web'], | 175 require => File['/home/hg/web'], |
| 186 source => 'puppet:///modules/hgweb/robots.txt', | 176 source => 'puppet:///modules/hgweb/robots.txt', |
| 187 } | 177 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 208 content => template('hgweb/nginx.conf.erb'), | 198 content => template('hgweb/nginx.conf.erb'), |
| 209 is_default => $is_default, | 199 is_default => $is_default, |
| 210 global_config => template('hgweb/nginx_global.conf.erb'), | 200 global_config => template('hgweb/nginx_global.conf.erb'), |
| 211 log => 'access_log_hg', | 201 log => 'access_log_hg', |
| 212 private_key => $private_key ? { | 202 private_key => $private_key ? { |
| 213 'undef' => undef, | 203 'undef' => undef, |
| 214 default => $private_key, | 204 default => $private_key, |
| 215 }, | 205 }, |
| 216 } | 206 } |
| 217 } | 207 } |
| LEFT | RIGHT |