Merge "Ensure curl is installed"

This commit is contained in:
Jenkins 2017-08-25 01:12:18 +00:00 committed by Gerrit Code Review
commit 3c54ae46b1
1 changed files with 9 additions and 2 deletions

View File

@ -12,20 +12,27 @@ class pip (
package { $::pip::params::python_devel_package:
ensure => present,
}
if !defined(Package['curl']) {
package { 'curl':
ensure => present,
}
}
if $::operatingsystem != 'CentOS' {
exec { 'download-pip3':
command => "/usr/bin/curl ${::pip::params::get_pip_location} | /usr/bin/python3 - -U --force-reinstall",
creates => $::pip::params::get_pip3_path,
before => Exec['download-pip'],
notify => Exec[$::pip::params::get_pip_path]
notify => Exec[$::pip::params::get_pip_path],
require => Package['curl'],
}
}
exec { 'download-pip':
command => "/usr/bin/curl ${::pip::params::get_pip_location} | /usr/bin/python - -U --force-reinstall",
creates => $::pip::params::get_pip2_path,
notify => Exec[$::pip::params::get_pip_path]
notify => Exec[$::pip::params::get_pip_path],
require => Package['curl'],
}
# NOTE(pabelanger): Default to pip2 for backwards compat