Left: | ||
Right: |
OLD | NEW |
---|---|
1 class trac( | 1 class trac( |
2 $domain, | 2 $domain, |
3 $certificate, | 3 $certificate, |
4 $private_key, | 4 $private_key, |
5 $fcgi_config_dir = '/etc/nginx/trac.d', | 5 $fcgi_config_dir = '/etc/nginx/trac.d', |
6 $is_default = false) inherits private::trac { | 6 $is_default = false) inherits private::trac { |
7 | 7 |
8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: | 8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: |
9 ensure => present | 9 ensure => present |
10 } | 10 } |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 Exec['install_TicketTemplate'], | 226 Exec['install_TicketTemplate'], |
227 Exec['install_NeverNotifyUpdater'], | 227 Exec['install_NeverNotifyUpdater'], |
228 Exec['install_MasterTickets'], | 228 Exec['install_MasterTickets'], |
229 Exec['install_ThemeEngine'], | 229 Exec['install_ThemeEngine'], |
230 Exec['install_Tractags'], | 230 Exec['install_Tractags'], |
231 Exec['install_TracSpamFilter'], | 231 Exec['install_TracSpamFilter'], |
232 Exec['install_PrivateTickets'], | 232 Exec['install_PrivateTickets'], |
233 Exec['install_TracXMLRPC'], | 233 Exec['install_TracXMLRPC'], |
234 Exec['install_TracHTTPAuth']], | 234 Exec['install_TracHTTPAuth']], |
235 } | 235 } |
236 | 236 |
237 exec {"deploy_$name": | 237 exec {"deploy_$name": |
238 command => "trac-admin /home/trac/$environment \ | 238 command => "trac-admin /home/trac/$environment \ |
239 deploy /home/trac/htdocs-$name \ | 239 deploy /home/trac/htdocs-$name \ |
240 && fromdos /home/trac/htdocs-$name/cgi-bin/trac.fcgi \ | 240 && fromdos /home/trac/htdocs-$name/cgi-bin/trac.fcgi \ |
241 && chmod 755 /home/trac/htdocs-$name/cgi-bin/trac.fcgi", | 241 && chmod 755 /home/trac/htdocs-$name/cgi-bin/trac.fcgi", |
242 user => trac, | 242 user => trac, |
243 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', | 243 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', |
244 require => [ | 244 require => [ |
245 Exec["update_env_$name"], | 245 Exec["update_env_$name"], |
246 Package["tofrodos"]], | 246 Package["tofrodos"]], |
247 } | 247 } |
248 | 248 |
249 file {"/home/trac/htdocs-$name/cgi-bin/trac_performance_fix.snippet": | |
mathias
2016/11/17 07:43:31
Why not using a target path like /usr/local/lib/py
f.nicolaisen
2016/11/17 08:23:46
Nice. Yeah, we can try doing that instead of exec/
mathias
2016/11/17 10:18:33
It should be possible, something like this one:
f.nicolaisen
2016/11/17 10:54:31
OK, I'll try. Thanks!
| |
250 ensure => present, | |
251 source => 'puppet:///modules/trac/trac_performance_fix.snippet', | |
252 owner => trac, | |
253 require => Exec["deploy_$name"], | |
254 } | |
255 | |
256 exec {"append_cgi_config_to_$name": | |
mathias
2016/11/17 07:43:31
It isn't really appending any more.
f.nicolaisen
2016/11/17 08:23:46
True that, will fix.
| |
257 command => "sed -i '/# Author: Jonas Borgström <jonas@edgewall.com> /r trac_performance_fix.snippet' trac.fcgi", | |
258 cwd => "/home/trac/htdocs-$name/cgi-bin/", | |
259 user => trac, | |
260 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', | |
261 require => File["/home/trac/htdocs-$name/cgi-bin/trac_performance_f ix.snippet"], | |
Wladimir Palant
2016/11/16 17:02:52
This should also require Exec["deploy_$name"], it
f.nicolaisen
2016/11/16 17:04:55
The File has that require, so this is transitively
Wladimir Palant
2016/11/16 18:57:32
Ah, I didn't notice this.
| |
262 } | |
263 | |
249 file {"/home/trac/htdocs-$name/htdocs/common/logo.png": | 264 file {"/home/trac/htdocs-$name/htdocs/common/logo.png": |
250 ensure => present, | 265 ensure => present, |
251 source => $logo, | 266 source => $logo, |
252 owner => trac, | 267 owner => trac, |
253 require => Exec["deploy_$name"], | 268 require => Exec["deploy_$name"], |
254 } | 269 } |
255 | 270 |
256 spawn-fcgi::pool {"tracd_${name}": | 271 spawn-fcgi::pool {"tracd_${name}": |
257 ensure => present, | 272 ensure => present, |
258 fcgi_app => "/home/trac/htdocs-$name/cgi-bin/trac.fcgi", | 273 fcgi_app => "/home/trac/htdocs-$name/cgi-bin/trac.fcgi", |
(...skipping 13 matching lines...) Expand all Loading... | |
272 # Daily restart required for log rotation of all instances at once | 287 # Daily restart required for log rotation of all instances at once |
273 cron {'restart-trac-daily': | 288 cron {'restart-trac-daily': |
274 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log', | 289 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log', |
275 environment => hiera('cron::environment', []), | 290 environment => hiera('cron::environment', []), |
276 hour => '1', | 291 hour => '1', |
277 minute => '0', | 292 minute => '0', |
278 user => 'root', | 293 user => 'root', |
279 } | 294 } |
280 } | 295 } |
281 | 296 |
OLD | NEW |