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
|
require python::pip
|
||||||
|
|
||||||
if $source {
|
if $source {
|
||||||
$filename = basename($name)
|
file { "/usr/local/src/${name}":
|
||||||
|
|
||||||
file { "/usr/local/src/${filename}":
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -182,11 +180,11 @@ define python::pip::install($source=undef) {
|
||||||
# Use exec to install from local files, pip package provider does not
|
# Use exec to install from local files, pip package provider does not
|
||||||
# support extra arguments. --no-index stops pip from accessing
|
# support extra arguments. --no-index stops pip from accessing
|
||||||
# pypi.
|
# pypi.
|
||||||
exec { "pip-install-${filename}":
|
exec { "pip-install-${name}":
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
path => '/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin',
|
path => '/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin',
|
||||||
command => "pip install --no-index --upgrade /usr/local/src/${filename}",
|
command => "pip install --no-index --upgrade /usr/local/src/${name}",
|
||||||
subscribe => File["/usr/local/src/${filename}"],
|
subscribe => File["/usr/local/src/${name}"],
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
package { $name:
|
package { $name:
|
||||||
|
|
Loading…
Add table
Reference in a new issue