summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSergey Stankevich <stankevich@users.noreply.github.com>2013-10-09 07:52:33 -0700
committerSergey Stankevich <stankevich@users.noreply.github.com>2013-10-09 07:52:33 -0700
commite6c6a0bf43a3f3afeb70d990b51211cc394f7ab9 (patch)
treee8a2be9bf5b25c358ce931c87bd09440fc8515b0 /manifests
parent45e4db1750f889dd018dfd030bc24fea02a19c23 (diff)
parenta2e66713c380c81a484583a3a33ff6dead87a496 (diff)
Merge pull request #33 from fredrikt/master
Add options install_args and uninstall_args.
Diffstat (limited to 'manifests')
-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,