
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
31 lines
677 B
Puppet
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,
|
|
}
|
|
}
|
|
}
|