summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/pip.pp18
1 files changed, 10 insertions, 8 deletions
diff --git a/manifests/pip.pp b/manifests/pip.pp
index ddbcd6f..1d576e0 100644
--- a/manifests/pip.pp
+++ b/manifests/pip.pp
@@ -35,12 +35,14 @@
# Fotis Gimian
#
define python::pip (
- $ensure = present,
- $virtualenv = 'system',
- $url = false,
- $owner = 'root',
- $proxy = false,
- $environment = []
+ $ensure = present,
+ $virtualenv = 'system',
+ $url = false,
+ $owner = 'root',
+ $proxy = false,
+ $environment = [],
+ $install_args = '',
+ $uninstall_args = '',
) {
# Parameter validation
@@ -80,7 +82,7 @@ define python::pip (
case $ensure {
present: {
exec { "pip_install_${name}":
- command => "$pip_env --log-file ${cwd}/pip.log install ${proxy_flag} ${source}",
+ command => "$pip_env --log-file ${cwd}/pip.log install $install_args ${proxy_flag} ${source}",
unless => "$pip_env freeze | grep -i -e ${grep_regex}",
user => $owner,
environment => $environment,
@@ -89,7 +91,7 @@ define python::pip (
default: {
exec { "pip_uninstall_${name}":
- command => "echo y | $pip_env uninstall ${proxy_flag} ${name}",
+ command => "echo y | $pip_env uninstall $uninstall_args ${proxy_flag} ${name}",
onlyif => "$pip_env freeze | grep -i -e ${grep_regex}",
user => $owner,
environment => $environment,