From adbe6aef57dd699222c5ae5583caf0c23c6d5913 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 3 Mar 2015 17:30:28 +0100 Subject: [PATCH] Add configurable Timeout settings on git vhost Under certain situations it can be good to force a higher timeout for git vhost. Add the possibility to send that parameter on the manifest, and ignore if no timeout is set. Change-Id: Ib74b5b5182e583dd7fa586f244174e41681636c8 --- manifests/init.pp | 1 + templates/git.vhost.erb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 6cd0ec9..590acc3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,6 +27,7 @@ class cgit( $ssl_key_file_contents = '', # If left empty puppet will not create file. $ssl_chain_file_contents = '', # If left empty puppet will not create file. $behind_proxy = false, + $cgit_timeout = false, ) { if $behind_proxy == true { diff --git a/templates/git.vhost.erb b/templates/git.vhost.erb index 1cde554..316cf0b 100644 --- a/templates/git.vhost.erb +++ b/templates/git.vhost.erb @@ -24,6 +24,10 @@ ErrorLog /var/log/httpd/git-error.log + <% if scope.lookupvar("cgit::cgit_timeout").is_a? Integer %> + Timeout <%= scope.lookupvar("cgit::cgit_timeout") %> + <% end %> + LogLevel warn CustomLog /var/log/httpd/git-access.log combined