Skip to content

Commit cf75187

Browse files
author
Shiva Poudel
committed
Merge pull request #168 from steverecio/master
Added gunicorn declarations for access_log_format, accesslog, and errorlog
2 parents 6fa5ec8 + 387d505 commit cf75187

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

manifests/gunicorn.pp

+15-12
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,21 @@
6666
# Marc Fournier
6767
#
6868
define python::gunicorn (
69-
$ensure = present,
70-
$virtualenv = false,
71-
$mode = 'wsgi',
72-
$dir = false,
73-
$bind = false,
74-
$environment = false,
75-
$owner = 'www-data',
76-
$group = 'www-data',
77-
$appmodule = 'app:app',
78-
$osenv = false,
79-
$timeout = 30,
80-
$template = 'python/gunicorn.erb',
69+
$ensure = present,
70+
$virtualenv = false,
71+
$mode = 'wsgi',
72+
$dir = false,
73+
$bind = false,
74+
$environment = false,
75+
$owner = 'www-data',
76+
$group = 'www-data',
77+
$appmodule = 'app:app',
78+
$osenv = false,
79+
$timeout = 30,
80+
$access_log_format = false,
81+
$accesslog = false,
82+
$errorlog = false,
83+
$template = 'python/gunicorn.erb',
8184
) {
8285

8386
# Parameter validation

templates/gunicorn.erb

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ CONFIG = {
3333
<% end -%>
3434
'--workers=<%= @processorcount.to_i*2 %>',
3535
'--timeout=<%= @timeout %>',
36+
<% if @access_log_format -%>
37+
'--access-logformat=<%= @access_log_format %>',
38+
<% end -%>
39+
<% if @accesslog -%>
40+
'--access-logfile=<%= @accesslog %>',
41+
<% end -%>
42+
<% if @errorlog -%>
43+
'--error-logfile=<%= @errorlog %>',
44+
<% end -%>
3645
<% if @mode != 'django' -%>
3746
'<%= @appmodule %>',
3847
<% end -%>

0 commit comments

Comments
 (0)