Skip to content

Commit 36243c3

Browse files
author
Derek Tamsen
committed
updating docs with new python::gunicorn osenv setting and updating tests for appmodule and osenv
1 parent 8e3d3e6 commit 36243c3

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ Manages Gunicorn virtual hosts.
174174

175175
**appmodule** - Set the application module name for gunicorn to load when not using Django. Default: app:app
176176

177+
**osenv** - Allows setting environment variables for the gunicorn service. Accepts a hash of 'key': 'value' pairs. Default: false
178+
177179
**template** - Which ERB template to use. Default: python/gunicorn.erb
178180

179181
```puppet
@@ -185,6 +187,7 @@ Manages Gunicorn virtual hosts.
185187
bind => 'unix:/tmp/gunicorn.socket',
186188
environment => 'prod',
187189
appmodule => 'app:app',
190+
osenv => { 'DBHOST' => 'dbserver.example.com' },
188191
template => 'python/gunicorn.erb',
189192
}
190193
```

manifests/gunicorn.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
# Set the application module name for gunicorn to load when not using Django.
3030
# Default: app:app
3131
#
32+
# [*osenv*]
33+
# Allows setting environment variables for the gunicorn service. Accepts a
34+
# hash of 'key': 'value' pairs.
35+
# Default: false
36+
#
3237
# [*template*]
3338
# Which ERB template to use. Default: python/gunicorn.erb
3439
#
@@ -44,6 +49,7 @@
4449
# owner => 'www-data',
4550
# group => 'www-data',
4651
# appmodule => 'app:app',
52+
# osenv => { 'DBHOST' => 'dbserver.example.com' },
4753
# template => 'python/gunicorn.erb',
4854
# }
4955
#

tests/gunicorn.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@
1111
dir => '/var/www/project1/current',
1212
bind => 'unix:/tmp/gunicorn.socket',
1313
environment => 'prod',
14+
appmodule => 'app:app',
15+
osenv => { 'DBHOST' => 'dbserver.example.com' },
1416
template => 'python/gunicorn.erb',
1517
}

0 commit comments

Comments
 (0)