From 89d5a237b3c6cadd17e54e2f8ca7e6b9b1c9ff2b Mon Sep 17 00:00:00 2001 From: asasfu Date: Thu, 4 Aug 2016 08:17:19 -0700 Subject: [PATCH] Patch to support Centos 7 in bootstrap Bootstrapping currently repeats on every run due to the `creates => '/usr/local/bin/pip'` Centos 7(and possibly others) which place pip executable in /usr/bin/pip The repeated bootstrap needs to be patched to avoid nodes constantly grabbing the get_pip.py which includes a binary blob. This patching looks to have been attempted before but failed to include `path => ....` which would support finding `which` in any of those locations as well as allowing `which pip` to only look in the supplied path, basically extending our creates to support multiple locations of pip. --- manifests/install.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 0be49533..69fde060 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -71,7 +71,8 @@ # Install pip without pip, see https://pip.pypa.io/en/stable/installing/. exec { 'bootstrap pip': command => '/usr/bin/curl https://bootstrap.pypa.io/get-pip.py | python', - creates => '/usr/local/bin/pip', + unless => 'which pip', + path => [ '/bin', '/usr/bin', '/usr/local/bin' ], require => Package['python'], }