diff options
author | Sergey Stankevich <sergey.stankevich@gmail.com> | 2013-11-08 13:28:27 +0200 |
---|---|---|
committer | Sergey Stankevich <sergey.stankevich@gmail.com> | 2013-11-08 13:28:27 +0200 |
commit | 7db751bc9525d82771abdaff17866e1e4ba83014 (patch) | |
tree | 1803d97cfc0fdf873b0cadb1af307f8a6c583fe4 /manifests | |
parent | 29bf73bfa6d3e0f6b880bb4c4125edc1b8f0675e (diff) | |
parent | 6372243d61025844e3aff4bff4591b1ea23449f5 (diff) |
Merge branch 'master' of github.com:stankevich/puppet-python
* 'master' of github.com:stankevich/puppet-python:
ws fix
example docs
docs
added cwd parameter, made timeout configurable
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/virtualenv.pp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index bdcfc6f..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': @@ -66,7 +72,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 +123,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}": |