Add PyMySQL python library for SQL Reporter support
It doens't have any other dependencies, but it's an optional depend for Zuul itself, because plugins. Install it for the scheduler. Also, provide an option flag to enable it. Change-Id: I4cad419598ffefcdca5161664c6d073da37fb42f
This commit is contained in:
parent
bdaeb08041
commit
98056b2c60
|
@ -19,7 +19,29 @@ class zuul::scheduler (
|
|||
$ensure = undef,
|
||||
$layout_dir = '',
|
||||
$manage_log_conf = true,
|
||||
$python_version = 2,
|
||||
$use_mysql = false,
|
||||
) {
|
||||
|
||||
include ::pip
|
||||
|
||||
if ($use_mysql) {
|
||||
if ($python_version == 3) {
|
||||
include ::pip::python3
|
||||
$pip_provider = pip3
|
||||
$pip_command = 'pip3'
|
||||
} else {
|
||||
$pip_provider = openstack_pip
|
||||
$pip_command = 'pip'
|
||||
}
|
||||
|
||||
package { 'PyMySQL':
|
||||
ensure => present,
|
||||
provider => $pip_provider,
|
||||
require => Class['pip'],
|
||||
}
|
||||
}
|
||||
|
||||
if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') {
|
||||
# This is a hack to make sure that systemd is aware of the new service
|
||||
# before we attempt to start it.
|
||||
|
|
Loading…
Reference in New Issue