diff options
author | Sergey Stankevich <sergey.stankevich@gmail.com> | 2013-11-18 10:32:26 +0200 |
---|---|---|
committer | Sergey Stankevich <sergey.stankevich@gmail.com> | 2013-11-18 10:32:26 +0200 |
commit | 2b8ec04df6734e70b2d64f3d533b7e6ed5665ecf (patch) | |
tree | 0775fdfc82bbdad8d625bd30614b690bf8cd1320 | |
parent | 1f79c6c00bafb4afd744a4be74e804f87a09aba8 (diff) | |
parent | 3cee11ffbf880f367b41796fbf6c530105519a99 (diff) |
Merge branch 'master' of github.com:stankevich/puppet-python
* 'master' of github.com:stankevich/puppet-python:
Add to python::pip ensure => latest
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | manifests/pip.pp | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -48,7 +48,7 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. Installs and manages packages from pip. -**ensure** - present/absent. Default: present +**ensure** - present/latest/absent. Default: present **virtualenv** - virtualenv to run pip in. Default: system (no virtualenv) diff --git a/manifests/pip.pp b/manifests/pip.pp index 3ca33a8..7b51439 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -95,6 +95,14 @@ define python::pip ( } } + latest: { + exec { "pip_install_${name}": + command => "$pip_env --log ${cwd}/pip.log install -U $install_args ${proxy_flag} ${source}", + user => $owner, + environment => $environment, + } + } + default: { exec { "pip_uninstall_${name}": command => "echo y | $pip_env uninstall $uninstall_args ${proxy_flag} ${name}", |