From c5a74f61540d1ab72a9c1b2d13537416e036629c Mon Sep 17 00:00:00 2001 From: Steve Recio Date: Mon, 9 Feb 2015 14:45:31 -0500 Subject: [PATCH 1/2] added declaration for accesslog --- templates/gunicorn.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb index a8a60f65..07a5bacb 100644 --- a/templates/gunicorn.erb +++ b/templates/gunicorn.erb @@ -35,6 +35,9 @@ CONFIG = { '--timeout=<%= @timeout %>', <% if @mode != 'django' -%> '<%= @appmodule %>', +<% end -%> +<% if @accesslog -%> + '--access-logfile=<%= @accesslog %>', <% end -%> ), } From 7c28ad8709ce360736d43401feba64bc7956654d Mon Sep 17 00:00:00 2001 From: Steve Recio Date: Mon, 9 Feb 2015 15:54:25 -0500 Subject: [PATCH 2/2] added gunicorn declarations for access_log_format, accesslog, and errorlog --- manifests/gunicorn.pp | 27 +++++++++++++++------------ templates/gunicorn.erb | 10 ++++++++-- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp index 19f5c7ae..cb0ea4fd 100644 --- a/manifests/gunicorn.pp +++ b/manifests/gunicorn.pp @@ -66,18 +66,21 @@ # Marc Fournier # define python::gunicorn ( - $ensure = present, - $virtualenv = false, - $mode = 'wsgi', - $dir = false, - $bind = false, - $environment = false, - $owner = 'www-data', - $group = 'www-data', - $appmodule = 'app:app', - $osenv = false, - $timeout = 30, - $template = 'python/gunicorn.erb', + $ensure = present, + $virtualenv = false, + $mode = 'wsgi', + $dir = false, + $bind = false, + $environment = false, + $owner = 'www-data', + $group = 'www-data', + $appmodule = 'app:app', + $osenv = false, + $timeout = 30, + $access_log_format = false, + $accesslog = false, + $errorlog = false, + $template = 'python/gunicorn.erb', ) { # Parameter validation diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb index 07a5bacb..8e435bb8 100644 --- a/templates/gunicorn.erb +++ b/templates/gunicorn.erb @@ -33,11 +33,17 @@ CONFIG = { <% end -%> '--workers=<%= @processorcount.to_i*2 %>', '--timeout=<%= @timeout %>', -<% if @mode != 'django' -%> - '<%= @appmodule %>', +<% if @access_log_format -%> + '--access-logformat=<%= @access_log_format %>', <% end -%> <% if @accesslog -%> '--access-logfile=<%= @accesslog %>', +<% end -%> +<% if @errorlog -%> + '--error-logfile=<%= @errorlog %>', +<% end -%> +<% if @mode != 'django' -%> + '<%= @appmodule %>', <% end -%> ), }