diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp index 3c0a8bbd..e7d0aeba 100644 --- a/manifests/gunicorn.pp +++ b/manifests/gunicorn.pp @@ -63,6 +63,7 @@ $owner = 'www-data', $group = 'www-data', $appmodule = 'app:app', + $osenv = false, $template = 'python/gunicorn.erb', ) { diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb index e1bb58b8..493a816e 100644 --- a/templates/gunicorn.erb +++ b/templates/gunicorn.erb @@ -6,6 +6,9 @@ CONFIG = { <% end -%> <% if @virtualenv -%> 'environment': { +<% if @osenv -%><% @osenv.sort.each do |key, value| -%> + '<%= key %>': '<%= value %>', +<% end -%><% end -%> <% if @environment -%> 'ENVIRONMENT': '<%= @environment %>', <% end -%>