Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting os environment vars in python::gunicorn #133

Merged
merged 3 commits into from
Oct 22, 2014

Conversation

derektamsen
Copy link
Contributor

Adding the ability to set os environment variables for the gunicorn process. This adds the "osenv" attribute to python::gunicorn which accepts a hash of 'key': 'value' pairs. This defaults to False which keeps backwards compatibility in the vhost gunicorn config file.

For example you could set an os environment variable that allows you to set a gunicorn app's database server with:

python::gunicorn { 'vhost':
  osenv       => { 'DBHOST' => 'dbserver.example.com' },
}

Which would add the following to /etc/gunicorn.d/vhost.conf:

...
'environment': {
    'DBHOST': 'dbserver.example.com',
...

Resolves #132

stankevich added a commit that referenced this pull request Oct 22, 2014
Allow setting os environment vars in python::gunicorn
@stankevich stankevich merged commit 7299cd1 into voxpupuli:master Oct 22, 2014
@derektamsen derektamsen deleted the 20141021-add_osenv_feature branch October 30, 2014 20:45
stankevich added a commit that referenced this pull request Sep 1, 2015
Allow setting os environment vars in python::gunicorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gunicorn does not allow passing in a list of environment variables
2 participants