summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorFotis Gimian <fgimiansoftware@gmail.com>2013-06-03 19:41:24 +1000
committerFotis Gimian <fgimiansoftware@gmail.com>2013-06-03 19:41:24 +1000
commit3c606c95e12be941529fdf86c14f3f35bcddbf69 (patch)
tree09f98d13868d7767d53e983e194d2ef54389c606 /manifests
parent64de5abe35e71ad85b971bcf9f99a0ea738a41e9 (diff)
Added owner, group to the pip class which ensures that packages will be installed with the correct permissions.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/pip.pp18
1 files changed, 11 insertions, 7 deletions
diff --git a/manifests/pip.pp b/manifests/pip.pp
index 3a8ec1b..b40b916 100644
--- a/manifests/pip.pp
+++ b/manifests/pip.pp
@@ -29,9 +29,11 @@
#
define python::pip (
$virtualenv,
- $ensure = present,
- $url = false,
- $proxy = false
+ $ensure = present,
+ $url = false,
+ $owner = 'root',
+ $group = 'root',
+ $proxy = false
) {
# Parameter validation
@@ -57,15 +59,17 @@ define python::pip (
case $ensure {
present: {
exec { "pip_install_${name}":
- command => "${virtualenv}/bin/pip install ${proxy_flag} ${source}",
- unless => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
+ command => "${virtualenv}/bin/pip install ${proxy_flag} ${source}",
+ unless => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
+ user => $owner,
}
}
default: {
exec { "pip_uninstall_${name}":
- command => "echo y | ${virtualenv}/bin/pip uninstall ${proxy_flag} ${name}",
- onlyif => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
+ command => "echo y | ${virtualenv}/bin/pip uninstall ${proxy_flag} ${name}",
+ onlyif => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
+ user => $owner,
}
}
}