From c377f1f27a440eb98a2cc79937f608bc4445b65b Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 25 May 2016 11:07:25 +0300 Subject: [PATCH] python: Remove redundant variable in python::pip::install --- python/manifests/init.pp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python/manifests/init.pp b/python/manifests/init.pp index fed9d0c..ac4670c 100644 --- a/python/manifests/init.pp +++ b/python/manifests/init.pp @@ -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: