From be335fa2048a60921b0896c770d87a60b53c4aea Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 7 Nov 2013 16:36:28 -0500 Subject: Add path to pip when executed out of virtualenv --- manifests/pip.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index ddbcd6f..a6faea8 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -84,6 +84,7 @@ define python::pip ( unless => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, + path => [ '/usr/bin', '/usr/local/bin/' ], } } -- cgit v1.2.3 From 52dfd22110ab3fdf83edb11868c53803d9f82b45 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 7 Nov 2013 17:24:53 -0500 Subject: Fix paths --- manifests/pip.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index a6faea8..6075c3a 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -84,7 +84,7 @@ define python::pip ( unless => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, - path => [ '/usr/bin', '/usr/local/bin/' ], + path => [ '/bin', '/usr/bin', '/usr/local/bin/' ], } } -- cgit v1.2.3 From a1fc8ab73c6c34413e2957bea1d3a6719e4612c4 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 7 Nov 2013 18:01:16 -0500 Subject: Add path to pip install/uninstall --- manifests/pip.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index 6075c3a..f64ea97 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -94,6 +94,7 @@ define python::pip ( onlyif => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, + path => [ '/bin', '/usr/bin', '/usr/local/bin/' ], } } } -- cgit v1.2.3 From 99a7bbbf8a0d4db3a2abba9f4a47ac65c223bbaa Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 7 Nov 2013 18:05:06 -0500 Subject: Fix paths --- manifests/pip.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index f64ea97..9589b1a 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -84,7 +84,7 @@ define python::pip ( unless => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, - path => [ '/bin', '/usr/bin', '/usr/local/bin/' ], + path => ["/usr/local/bin","/usr/bin","/bin", "/usr/sbin"], } } @@ -94,7 +94,7 @@ define python::pip ( onlyif => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, - path => [ '/bin', '/usr/bin', '/usr/local/bin/' ], + path => ["/usr/local/bin","/usr/bin","/bin", "/usr/sbin"], } } } -- cgit v1.2.3 From 2e3784ba2c93f8240648682ce0b3c14bcb8605a7 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 7 Nov 2013 18:46:52 -0500 Subject: Added latest support to pip, fixed log param --log-file is not supported in older versions, changed to use --log Added ability to do pip --upgrade by using latest --- manifests/pip.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index 9589b1a..0bed6dc 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -80,7 +80,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 ${cwd}/pip.log install ${proxy_flag} ${source}", unless => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, @@ -88,6 +88,15 @@ define python::pip ( } } + latest: { + exec { "pip_install_${name}": + command => "$pip_env --log ${cwd}/pip.log install --upgrade ${proxy_flag} ${source}", + user => $owner, + environment => $environment, + path => ["/usr/local/bin","/usr/bin","/bin", "/usr/sbin"], + } + } + default: { exec { "pip_uninstall_${name}": command => "echo y | $pip_env uninstall ${proxy_flag} ${name}", -- cgit v1.2.3