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

Unified Diff: modules/trac/manifests/init.pp

Issue 29362580: Issue 4641 - Append performance fix to trac cgi file (Closed)
Patch Set: Issue 4641 - Performance fix to trac cgi file Created Nov. 16, 2016, 4:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/trac/manifests/init.pp
===================================================================
--- a/modules/trac/manifests/init.pp
+++ b/modules/trac/manifests/init.pp
@@ -233,7 +233,7 @@
Exec['install_TracXMLRPC'],
Exec['install_TracHTTPAuth']],
}
-
+
exec {"deploy_$name":
command => "trac-admin /home/trac/$environment \
deploy /home/trac/htdocs-$name \
@@ -245,7 +245,22 @@
Exec["update_env_$name"],
Package["tofrodos"]],
}
-
+
+ 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!
+ ensure => present,
+ source => 'puppet:///modules/trac/trac_performance_fix.snippet',
+ owner => trac,
+ require => Exec["deploy_$name"],
+ }
+
+ 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.
+ command => "sed -i '/# Author: Jonas Borgström <jonas@edgewall.com>/r trac_performance_fix.snippet' trac.fcgi",
+ cwd => "/home/trac/htdocs-$name/cgi-bin/",
+ user => trac,
+ path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin',
+ require => File["/home/trac/htdocs-$name/cgi-bin/trac_performance_fix.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.
+ }
+
file {"/home/trac/htdocs-$name/htdocs/common/logo.png":
ensure => present,
source => $logo,

Powered by Google App Engine
This is Rietveld