From b34777a383fc184c0f65ee3bb57d50436b9b6b48 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 10 Aug 2015 07:28:02 +0000 Subject: [PATCH] Fix the puppet-pip module to install pip The class pip does not install pip, as one would expect. This fixes it. Change-Id: I926cbfc1f65805c29a72597eede8c47228bdee30 --- manifests/init.pp | 5 +++++ manifests/params.pp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 49b5fd0..62a1537 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,6 +12,11 @@ class pip ( ensure => present, } + exec { 'download-pip': + command => "/usr/bin/curl ${::pip::params::get_pip_location} | /usr/bin/python", + creates => '/usr/local/bin/pip', + } + if $manage_pip_conf { file { '/etc/pip.conf': owner => 'root', diff --git a/manifests/params.pp b/manifests/params.pp index 3bd4f86..93bc06a 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,9 +3,11 @@ # This class holds parameters that need to be # accessed by other classes. class pip::params { + $get_pip_location = 'https://bootstrap.pypa.io/get-pip.py' + case $::osfamily { 'RedHat': { - $python_devel_package = 'python-devel' + $python_devel_package = 'python-devel' $python3_devel_package = 'python3-devel' $python3_pip_package = 'python3-pip' }