From 8a68085f7450f95ca736c690e14b58a0998a13f1 Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 7 Nov 2013 15:57:10 -0500 Subject: added cwd parameter, made timeout configurable --- manifests/virtualenv.pp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index bdcfc6f..8fc17a9 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -66,7 +66,9 @@ define python::virtualenv ( $group = 'root', $proxy = false, $environment = [], - $path = [ '/bin', '/usr/bin', '/usr/sbin' ] + $path = [ '/bin', '/usr/bin', '/usr/sbin' ], + $cwd = undef, + $timeout = 1800 ) { $venv_dir = $name @@ -115,10 +117,11 @@ define python::virtualenv ( exec { "python_requirements_initial_install_${requirements}_${venv_dir}": command => "${venv_dir}/bin/pip --log-file ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} -r ${requirements}", refreshonly => true, - timeout => 1800, + timeout => $timeout, user => $owner, subscribe => Exec["python_virtualenv_${venv_dir}"], environment => $environment, + cwd => $cwd } python::requirements { "${requirements}_${venv_dir}": -- cgit v1.2.3 From c45a37b5819d3c0dab423b93cefb31e65bddad9d Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 7 Nov 2013 16:03:28 -0500 Subject: docs --- manifests/virtualenv.pp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'manifests') diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 8fc17a9..8486183 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -37,6 +37,12 @@ # [*path*] # Specifies the PATH variable. Default: [ '/bin', '/usr/bin', '/usr/sbin' ] # +# [*cwd*] +# The directory from which to run the "pip install" command. Default: undef +# +# [*timeout*] +# The maximum time in seconds the "pip install" command should take. Default: 1800 +# # === Examples # # python::virtualenv { '/var/www/project1': -- cgit v1.2.3