Merge pull request #74 from jmchilton/specify_engine
Allow consumer to specify default storage engine for MySQL server.
This commit is contained in:
commit
65de49f090
3 changed files with 21 additions and 13 deletions
|
@ -43,7 +43,8 @@ class mysql::config(
|
|||
$ssl_ca = $mysql::params::ssl_ca,
|
||||
$ssl_cert = $mysql::params::ssl_cert,
|
||||
$ssl_key = $mysql::params::ssl_key,
|
||||
$log_error = $mysql::params::log_error
|
||||
$log_error = $mysql::params::log_error,
|
||||
$default_engine = 'UNSET'
|
||||
) inherits mysql::params {
|
||||
|
||||
File {
|
||||
|
|
|
@ -9,6 +9,7 @@ describe 'mysql::config' do
|
|||
:port => '3306',
|
||||
:etc_root_password => false,
|
||||
:datadir => '/var/lib/mysql',
|
||||
:default_engine => 'UNSET',
|
||||
:ssl => false,
|
||||
:ssl_ca => '/etc/mysql/cacert.pem',
|
||||
:ssl_cert => '/etc/mysql/server-cert.pem',
|
||||
|
@ -81,6 +82,7 @@ describe 'mysql::config' do
|
|||
:bind_address => '0.0.0.0',
|
||||
:port => '3306',
|
||||
:datadir => '/path/to/datadir',
|
||||
:default_engine => 'InnoDB',
|
||||
:ssl => true,
|
||||
:ssl_ca => '/path/to/cacert.pem',
|
||||
:ssl_cert => '/path/to/server-cert.pem',
|
||||
|
@ -140,6 +142,9 @@ describe 'mysql::config' do
|
|||
"datadir = #{param_values[:datadir]}",
|
||||
"bind-address = #{param_values[:bind_address]}"
|
||||
]
|
||||
if param_values[:default_engine] != 'UNSET'
|
||||
expected_lines = expected_lines | [ "default-storage-engine = #{param_values[:default_engine]}" ]
|
||||
end
|
||||
if param_values[:ssl]
|
||||
expected_lines = expected_lines |
|
||||
[
|
||||
|
|
|
@ -23,7 +23,9 @@ query_cache_size = 16M
|
|||
log_error = <%= log_error %>
|
||||
expire_logs_days = 10
|
||||
max_binlog_size = 100M
|
||||
|
||||
<% if default_engine != 'UNSET' %>
|
||||
default-storage-engine = <%= default_engine %>
|
||||
<% end %>
|
||||
<% if ssl == true %>
|
||||
ssl-ca = <%= ssl_ca %>
|
||||
ssl-cert = <%= ssl_cert %>
|
||||
|
|
Loading…
Reference in a new issue