Skip to content

Commit 35f493f

Browse files
author
Derek Tamsen
committed
Adding osenv hash to set os environment vars for gunicorn
1 parent fcc91ae commit 35f493f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

manifests/gunicorn.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
$owner = 'www-data',
6464
$group = 'www-data',
6565
$appmodule = 'app:app',
66+
$osenv = false,
6667
$template = 'python/gunicorn.erb',
6768
) {
6869

templates/gunicorn.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ CONFIG = {
66
<% end -%>
77
<% if @virtualenv -%>
88
'environment': {
9+
<% if @osenv -%><% @osenv.sort.each do |key, value| -%>
10+
'<%= key %>': '<%= value %>',
11+
<% end -%><% end -%>
912
<% if @environment -%>
1013
'ENVIRONMENT': '<%= @environment %>',
1114
<% end -%>

0 commit comments

Comments
 (0)