From 11666f9b9ebf04cffd19ad49f57e3fb879876d76 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Wed, 17 Oct 2012 20:31:43 +0000 Subject: If the proxy is unset then you cannot set http_proxy in the environment or it breaks pip completely and the virtualenv fails. --- manifests/virtualenv.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index a5cf12b..f22f4e1 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -50,9 +50,14 @@ define python::virtualenv ( default => "--proxy=${proxy}", } + $proxy_command = $proxy ? { + false => '', + default => "&& export http_proxy=${proxy}", + } + exec { "python_virtualenv_${venv_dir}": command => "mkdir -p ${venv_dir} \ - && export http_proxy=${proxy} \ + ${proxy_command} \ && virtualenv -p `which ${python}` ${venv_dir} \ && ${venv_dir}/bin/pip install ${proxy_flag} --upgrade distribute pip", creates => $venv_dir, -- cgit v1.2.3 From 97971464c54989e4254cebc7a754f174c26c5a70 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 18 Oct 2012 13:52:40 +0000 Subject: Allow more than one python::requirements to be used. --- manifests/requirements.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/requirements.pp b/manifests/requirements.pp index e49c86c..c588504 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -39,7 +39,7 @@ define python::requirements ( } $req_dir = inline_template('<%= requirements.match(%r!(.+)/.+!)[1] %>') - $req_crc = "${req_dir}/requirements.sha1" + $req_crc = "${req_dir}/$requirements.sha1" file { $requirements: ensure => present, -- cgit v1.2.3 From ebd231f6df6a123237397df0264bc463b6fd71d4 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 18 Oct 2012 14:02:12 +0000 Subject: Remove the directory part so it can actually write the file. --- manifests/requirements.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/requirements.pp b/manifests/requirements.pp index c588504..b6c9b34 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -39,7 +39,7 @@ define python::requirements ( } $req_dir = inline_template('<%= requirements.match(%r!(.+)/.+!)[1] %>') - $req_crc = "${req_dir}/$requirements.sha1" + $req_crc = "${requirements}.sha1" file { $requirements: ensure => present, -- cgit v1.2.3 From 7a05a89acab1b9844416ac42d290a66122b08539 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 18 Oct 2012 20:52:21 +0000 Subject: Add app_interface. --- manifests/gunicorn.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests') diff --git a/manifests/gunicorn.pp b/manifests/gunicorn.pp index d328d75..2548e95 100644 --- a/manifests/gunicorn.pp +++ b/manifests/gunicorn.pp @@ -41,12 +41,13 @@ # Sergey Stankevich # define python::gunicorn ( - $ensure = present, - $virtualenv = false, - $mode = 'wsgi', - $dir = false, - $bind = false, - $environment = false + $ensure = present, + $virtualenv = false, + $mode = 'wsgi', + $dir = false, + $bind = false, + $app_interface = 'wsgi', + $environment = false, ) { # Parameter validation -- cgit v1.2.3