summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Jagodziński <hubert.jagodzinski@allegro.pl>2013-11-18 08:27:57 +0100
committerHubert Jagodziński <hubert.jagodzinski@allegro.pl>2013-11-18 08:27:57 +0100
commit8bf9aac814812d0235ee5aa08e097d6dd03c188d (patch)
tree6bfcfa45f0add29b3a00f081b043debf2a5d8617
parent7db751bc9525d82771abdaff17866e1e4ba83014 (diff)
Add to python::pip ensure => latest
-rw-r--r--README.md2
-rw-r--r--manifests/pip.pp8
2 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0bcd952..751376a 100644
--- a/README.md
+++ b/README.md
@@ -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}",