Skip to content

Commit

Permalink
added gunicorn declarations for access_log_format, accesslog, and err…
Browse files Browse the repository at this point in the history
…orlog
  • Loading branch information
steverecio committed Feb 9, 2015
1 parent c5a74f6 commit 7c28ad8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
27 changes: 15 additions & 12 deletions manifests/gunicorn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions templates/gunicorn.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
),
}

0 comments on commit 7c28ad8

Please sign in to comment.