summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--manifests/gunicorn.pp7
-rw-r--r--tests/gunicorn.pp1
3 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index ba4b766..65cd391 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,8 @@ Manages Gunicorn virtual hosts.
**environment** — Set ENVIRONMENT variable. Default: none
+**template** — Which ERB template to use. Default: python/gunicorn.erb
+
python::gunicorn { 'vhost':
ensure => present,
virtualenv => '/var/www/project1',
@@ -97,6 +99,7 @@ Manages Gunicorn virtual hosts.
dir => '/var/www/project1/current',
bind => 'unix:/tmp/gunicorn.socket',
environment => 'prod',
+ template => 'python/gunicorn.erb',
}
## Authors
diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp
index 659555f..1b53fc8 100644
--- a/manifests/gunicorn.pp
+++ b/manifests/gunicorn.pp
@@ -25,6 +25,9 @@
# [*environment*]
# Set ENVIRONMENT variable. Default: none
#
+# [*template*]
+# Which ERB template to use. Default: python/gunicorn.erb
+#
# === Examples
#
# python::gunicorn { 'vhost':
@@ -34,6 +37,7 @@
# dir => '/var/www/project1/current',
# bind => 'unix:/tmp/gunicorn.socket',
# environment => 'prod',
+# template => 'python/gunicorn.erb',
# }
#
# === Authors
@@ -47,6 +51,7 @@ define python::gunicorn (
$dir = false,
$bind = false,
$environment = false,
+ $template = 'python/gunicorn.erb',
) {
# Parameter validation
@@ -59,7 +64,7 @@ define python::gunicorn (
mode => '0644',
owner => 'root',
group => 'root',
- content => template('python/gunicorn.erb'),
+ content => template($template),
}
}
diff --git a/tests/gunicorn.pp b/tests/gunicorn.pp
index c081fd6..c32ea1a 100644
--- a/tests/gunicorn.pp
+++ b/tests/gunicorn.pp
@@ -11,4 +11,5 @@ python::gunicorn { 'vhost':
dir => '/var/www/project1/current',
bind => 'unix:/tmp/gunicorn.socket',
environment => 'prod',
+ template => 'python/gunicorn.erb',
}