Colleen Murphy d5655ff4d1 Fix pip executable path for RH
get-pip.py installs pip to /bin/pip on centos 7. Without this fix, the
download-pip exec will keep trying to install pip whether or not it is
already installed on our base images or by puppet.

Change-Id: Ic5bcce59148aacedc61315e616317fc73c2c161c
2016-04-06 13:26:46 -07:00

31 lines
677 B
Puppet

# Class: pip
#
class pip (
$index_url = 'https://pypi.python.org/simple',
$manage_pip_conf = false,
$optional_settings = {},
$trusted_hosts = [],
) {
include ::pip::params
validate_array($trusted_hosts)
package { $::pip::params::python_devel_package:
ensure => present,
}
exec { 'download-pip':
command => "/usr/bin/curl ${::pip::params::get_pip_location} | /usr/bin/python",
creates => $::pip::params::get_pip_path,
}
if $manage_pip_conf {
file { '/etc/pip.conf':
owner => 'root',
group => 'root',
mode => '0444',
content => template('pip/pip.conf.erb'),
replace => true,
}
}
}