Add support for python 3

Change-Id: Ie2c223d74b32798e5f0cb0ca8b76d9fa6a4f3095
This commit is contained in:
David Shrewsbury 2017-07-19 11:17:11 -04:00
parent f7202f7743
commit 07e39e7bdc
1 changed files with 10 additions and 1 deletions

View File

@ -51,6 +51,7 @@ class nodepool (
$mysql_user_name = 'nodepool',
$split_daemon = false,
$install_nodepool_builder = true,
$python_version = 2,
) {
if($install_mysql) {
@ -107,8 +108,16 @@ class nodepool (
}
include ::pip
if ($python_version == 3) {
include ::pip::python3
$pip_command = 'pip3'
} else {
$pip_command = 'pip'
}
exec { 'install_nodepool' :
command => 'pip install -U /opt/nodepool',
command => '${pip_command} install -U /opt/nodepool',
path => '/usr/local/bin:/usr/bin:/bin/',
refreshonly => true,
subscribe => Vcsrepo['/opt/nodepool'],