From 452451e8f5c0bd40b867088f481c130a21efb0a1 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Sun, 4 Nov 2012 21:31:46 +0100 Subject: python::gunicorn - removed unused/undocumented attributes. --- manifests/gunicorn.pp | 1 - manifests/requirements.pp | 1 - 2 files changed, 2 deletions(-) (limited to 'manifests') diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp index 2548e95..659555f 100644 --- a/manifests/gunicorn.pp +++ b/manifests/gunicorn.pp @@ -46,7 +46,6 @@ define python::gunicorn ( $mode = 'wsgi', $dir = false, $bind = false, - $app_interface = 'wsgi', $environment = false, ) { diff --git a/manifests/requirements.pp b/manifests/requirements.pp index b6c9b34..c7b9c25 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -38,7 +38,6 @@ define python::requirements ( default => "--proxy=${proxy}", } - $req_dir = inline_template('<%= requirements.match(%r!(.+)/.+!)[1] %>') $req_crc = "${requirements}.sha1" file { $requirements: -- cgit v1.2.3 From 5477c34707d6d59b4e7fd0a77c87183b59c37e52 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 6 Nov 2012 21:23:46 +0100 Subject: python::virtualenv - '--system-site-packages' option New 'systempkgs' parameter will call virtualenv with the '--system-site-packages' option, which can greatly speed up creation in some cases. --- manifests/virtualenv.pp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index f22f4e1..e286699 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -16,6 +16,9 @@ # [*proxy*] # Proxy server to use for outbound connections. Default: none # +# [*systempkgs*] +# Copy system site-packages into virtualenv. Default: don't +# # === Examples # # python::virtualenv { '/var/www/project1': @@ -23,6 +26,7 @@ # version => 'system', # requirements => '/var/www/project1/requirements.txt', # proxy => 'http://proxy.domain.com:3128', +# systempkgs => true, # } # # === Authors @@ -33,7 +37,8 @@ define python::virtualenv ( $ensure = present, $version = 'system', $requirements = false, - $proxy = false + $proxy = false, + $systempkgs = false, ) { $venv_dir = $name @@ -55,10 +60,15 @@ define python::virtualenv ( default => "&& export http_proxy=${proxy}", } + $system_pkgs_flag = $systempkgs ? { + false => '', + default => '--system-site-packages', + } + exec { "python_virtualenv_${venv_dir}": command => "mkdir -p ${venv_dir} \ ${proxy_command} \ - && virtualenv -p `which ${python}` ${venv_dir} \ + && virtualenv -p `which ${python}` ${system_pkgs_flag} ${venv_dir} \ && ${venv_dir}/bin/pip install ${proxy_flag} --upgrade distribute pip", creates => $venv_dir, } -- cgit v1.2.3 From e63664bc1ccc540a45a1c4eea90a0f7ea482e406 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 6 Nov 2012 21:34:03 +0100 Subject: python::gunicorn - added template parameter The idea is to be able to use a different template, in case the one provided with the module doesn't fit the user's need. --- manifests/gunicorn.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manifests') 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), } } -- cgit v1.2.3 From e7f975a20639d1e3adbfa85f956485238c040506 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 6 Nov 2012 21:42:02 +0100 Subject: updated authors. --- manifests/gunicorn.pp | 2 ++ manifests/requirements.pp | 1 + manifests/virtualenv.pp | 2 ++ 3 files changed, 5 insertions(+) (limited to 'manifests') diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp index 1b53fc8..13f4872 100644 --- a/manifests/gunicorn.pp +++ b/manifests/gunicorn.pp @@ -43,6 +43,8 @@ # === Authors # # Sergey Stankevich +# Ashley Penney +# Marc Fournier # define python::gunicorn ( $ensure = present, diff --git a/manifests/requirements.pp b/manifests/requirements.pp index c7b9c25..4dd1f1f 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -20,6 +20,7 @@ # === Authors # # Sergey Stankevich +# Ashley Penney # define python::requirements ( $virtualenv = 'system', diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index e286699..e816468 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -32,6 +32,8 @@ # === Authors # # Sergey Stankevich +# Ashley Penney +# Marc Fournier # define python::virtualenv ( $ensure = present, -- cgit v1.2.3