Add logic to work with old and new mysql module
This patch uses the load_module_metadata function to check whether the mysql module has a metadata.json file. If it does, we can assume it's new enough to support the new interface. If not, use the old one. Change-Id: I3ff754b15eef51c3c86c188647353a4a1d3bfea0 Depends-On: Ia366c0f7f1bfbfa843071e733a5b0a96873a60d8
This commit is contained in:
parent
2a7b369cee
commit
ec77bbc38b
@ -37,6 +37,8 @@ class nodepool (
|
||||
) {
|
||||
|
||||
|
||||
$mysql_data = load_module_metadata('mysql', true)
|
||||
if $mysql_data == {} {
|
||||
class { '::mysql::server':
|
||||
config_hash => {
|
||||
'root_password' => $mysql_root_password,
|
||||
@ -44,6 +46,16 @@ class nodepool (
|
||||
'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…
x
Reference in New Issue
Block a user