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

Side by Side Diff: modules/hgweb/manifests/init.pp

Issue 29370651: Issue 3065 - Make hgweb work with jessie (Closed)
Patch Set: For comments on TS with fred and ferris Created Jan. 4, 2017, 5 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
« no previous file with comments | « modules/hgweb/files/hgweb.service ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 file {'/etc/init.d/hgweb': 155 if $::operatingsystem == "Ubuntu" {
156 mode => 755, 156 file {'init_script':
157 require => File['/opt/hgweb.fcgi'], 157 name => '/etc/init.d/hgweb',
158 source => 'puppet:///modules/hgweb/hgweb.sh', 158 mode => 755,
159 require => File['/opt/hgweb.fcgi'],
160 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 }
159 } 179 }
160 180
161 file {'/home/hg/web/robots.txt': 181 file {'/home/hg/web/robots.txt':
162 group => 'hg', 182 group => 'hg',
163 mode => 0644, 183 mode => 0644,
164 owner => 'hg', 184 owner => 'hg',
165 require => File['/home/hg/web'], 185 require => File['/home/hg/web'],
166 source => 'puppet:///modules/hgweb/robots.txt', 186 source => 'puppet:///modules/hgweb/robots.txt',
167 } 187 }
168 188
169 service {'hgweb': 189 service {'hgweb':
170 enable => true, 190 enable => true,
171 ensure => 'running', 191 ensure => 'running',
172 hasrestart => true, 192 hasrestart => true,
173 hasstatus => false, 193 hasstatus => false,
174 pattern => 'hgweb.fcgi', 194 pattern => 'hgweb.fcgi',
175 require => File['/etc/init.d/hgweb'], 195 require => File['init_script'],
176 subscribe => File['/etc/hgweb.ini'], 196 subscribe => File['/etc/hgweb.ini'],
177 } 197 }
178 198
179 customservice::supervisor {'hgweb': 199 customservice::supervisor {'hgweb':
180 ensure => 'present', 200 ensure => 'present',
181 } 201 }
182 202
183 nginx::hostconfig {$domain: 203 nginx::hostconfig {$domain:
184 certificate => $certificate ? { 204 certificate => $certificate ? {
185 'undef' => undef, 205 'undef' => undef,
186 default => $certificate, 206 default => $certificate,
187 }, 207 },
188 content => template('hgweb/nginx.conf.erb'), 208 content => template('hgweb/nginx.conf.erb'),
189 is_default => $is_default, 209 is_default => $is_default,
190 global_config => template('hgweb/nginx_global.conf.erb'), 210 global_config => template('hgweb/nginx_global.conf.erb'),
191 log => 'access_log_hg', 211 log => 'access_log_hg',
192 private_key => $private_key ? { 212 private_key => $private_key ? {
193 'undef' => undef, 213 'undef' => undef,
194 default => $private_key, 214 default => $private_key,
195 }, 215 },
196 } 216 }
197 } 217 }
OLDNEW
« no previous file with comments | « modules/hgweb/files/hgweb.service ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld