
Create an initial pip.conf file and allow passing several settings such as index url and trusted hosts. Change-Id: I78962555c9a9ec1a96ce19810a463a5d619b04f9
25 lines
474 B
Puppet
25 lines
474 B
Puppet
# Class: pip
|
|
#
|
|
class pip (
|
|
$index_url = 'https://pypi.python.org/simple',
|
|
$trusted_hosts = [],
|
|
$manage_pip_conf = false,
|
|
) {
|
|
include pip::params
|
|
validate_array($trusted_hosts)
|
|
|
|
package { $::pip::params::python_devel_package:
|
|
ensure => present,
|
|
}
|
|
|
|
if $manage_pip_conf {
|
|
file { '/etc/pip.conf':
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
content => template('pip/pip.conf.erb'),
|
|
replace => true,
|
|
}
|
|
}
|
|
}
|