Merge "Add logic to use use available mysql module"
This commit is contained in:
commit
a265ec7357
|
@ -791,8 +791,15 @@ class gerrit(
|
|||
],
|
||||
}
|
||||
|
||||
package { 'mysql-client':
|
||||
ensure => present,
|
||||
$mysql_data = load_module_metadata('mysql', true)
|
||||
if $mysql_data == {} {
|
||||
package { 'mysql-client':
|
||||
ensure => present,
|
||||
before => File['/etc/mysql/conf.d/client.conf'],
|
||||
}
|
||||
} else {
|
||||
include ::mysql::client
|
||||
Class['::mysql::client'] -> File['/etc/mysql/conf.d/client.conf']
|
||||
}
|
||||
# Add config to make clients assume UTF-8 encoding
|
||||
file { '/etc/mysql/conf.d/client.conf':
|
||||
|
@ -802,7 +809,6 @@ class gerrit(
|
|||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
require => Package['mysql-client'],
|
||||
}
|
||||
|
||||
# Gerrit 2.10 requires libs not available in ubuntu repositories
|
||||
|
|
|
@ -7,11 +7,26 @@ class gerrit::mysql(
|
|||
$database_password = '',
|
||||
) {
|
||||
|
||||
class { '::mysql::server':
|
||||
config_hash => {
|
||||
'root_password' => $mysql_root_password,
|
||||
'default_engine' => 'InnoDB',
|
||||
'bind_address' => '127.0.0.1',
|
||||
$mysql_data = load_module_metadata('mysql', true)
|
||||
if $mysql_data == {} {
|
||||
warning("An old version of the puppetlabs-mysql module was found on your \
|
||||
system. The gerrit module only officially supports the latest 3.x version of \
|
||||
the mysql module.")
|
||||
class { '::mysql::server':
|
||||
config_hash => {
|
||||
'root_password' => $mysql_root_password,
|
||||
'default_engine' => 'InnoDB',
|
||||
'bind_address' => '127.0.0.1',
|
||||
}
|
||||
}
|
||||
} else { # If it has metadata.json, assume it's new enough to use this interface
|
||||
class { '::mysql::server':
|
||||
root_password => $mysql_root_password,
|
||||
override_options => {
|
||||
'mysqld' => {
|
||||
'default-storage-engine' => 'InnoDB',
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
include ::mysql::server::account_security
|
||||
|
|
Loading…
Reference in New Issue