summaryrefslogtreecommitdiff
path: root/manifests/virtualenv.pp
diff options
context:
space:
mode:
authorJarl Stefansson <jarl@sdelements.com>2013-12-12 14:00:03 -0500
committerJarl Stefansson <jarl@sdelements.com>2013-12-12 14:00:03 -0500
commitf7801a4b0d9ae58187891d124c21d269eae19ba5 (patch)
tree5d49eb83f680747542ae8e4eabece3c47934157c /manifests/virtualenv.pp
parent69d2a1447cb3b72fc25ebf19f6f82a35ef4aeb1f (diff)
Fix virtualenv, rebuild if not correct env
Diffstat (limited to 'manifests/virtualenv.pp')
-rw-r--r--manifests/virtualenv.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp
index 95fe1f7..1a2b093 100644
--- a/manifests/virtualenv.pp
+++ b/manifests/virtualenv.pp
@@ -114,10 +114,10 @@ define python::virtualenv (
exec { "python_virtualenv_${venv_dir}":
command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip --log-file ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} --upgrade pip ${distribute_pkg}",
user => $owner,
- creates => "${venv_dir}/bin/activate",
path => $path,
cwd => "/tmp",
environment => $environment,
+ unless => "grep '^[ \t]*VIRTUAL_ENV=[\'\"]*/tmp[\"\']*[ \t]*$' /tmp/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv
}
if $requirements {