python: Remove redundant variable in python::pip::install
This commit is contained in:
parent
30e5c458a9
commit
c377f1f27a
1 changed files with 4 additions and 6 deletions
|
@ -166,9 +166,7 @@ define python::pip::install($source=undef) {
|
|||
require python::pip
|
||||
|
||||
if $source {
|
||||
$filename = basename($name)
|
||||
|
||||
file { "/usr/local/src/${filename}":
|
||||
file { "/usr/local/src/${name}":
|
||||
ensure => present,
|
||||
mode => '0644',
|
||||
owner => 'root',
|
||||
|
@ -182,11 +180,11 @@ define python::pip::install($source=undef) {
|
|||
# Use exec to install from local files, pip package provider does not
|
||||
# support extra arguments. --no-index stops pip from accessing
|
||||
# pypi.
|
||||
exec { "pip-install-${filename}":
|
||||
exec { "pip-install-${name}":
|
||||
refreshonly => true,
|
||||
path => '/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin',
|
||||
command => "pip install --no-index --upgrade /usr/local/src/${filename}",
|
||||
subscribe => File["/usr/local/src/${filename}"],
|
||||
command => "pip install --no-index --upgrade /usr/local/src/${name}",
|
||||
subscribe => File["/usr/local/src/${name}"],
|
||||
}
|
||||
} else {
|
||||
package { $name:
|
||||
|
|
Loading…
Add table
Reference in a new issue