Mercurial > repos > other > Puppet
changeset 273:48b154d5ea53
Fix Mariadb setup by removing now removed config values
They were necessary under CentOS 7, then deprecated, now the
behaviour is the default and the option has been removed
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 04 Jan 2020 11:34:30 +0000 |
parents | c42fb28cff86 |
children | b2571c28fc27 |
files | modules/website/manifests/mysql.pp |
diffstat | 1 files changed, 25 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/website/manifests/mysql.pp Fri Jan 03 19:56:04 2020 +0000 +++ b/modules/website/manifests/mysql.pp Sat Jan 04 11:34:30 2020 +0000 @@ -14,24 +14,34 @@ php_enable => true, php_package_name => "php${phpsuffix}-mysql${phpmysqlsuffix}", } + $mysqld_base_settings = { + 'query_cache_size' => '64M', + 'join_buffer_size' => '524288', #512K + 'tmp_table_size' => '64M', + 'max_heap_table_size' => '64M', + 'table_open_cache' => '64', + 'log-queries-not-using-indexes' => '1', + # Set a sensible default character set + 'character-set-server' => 'utf8', + 'collation-server' => 'utf8_general_ci', + # Settings for best MySQL 4-byte Unicode support + 'innodb_file_per_table' => '1', + } + + if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 { + $mysqld_settings = $mysqld_base_settings + } else { + $mysqld_settings = $mysqld_base_settings + { + 'innodb_file_format' => 'barracuda', + 'innodb_large_prefix' => 'true', + } + } + + class { 'mysql::server': package_name => "${mysqlprefix}${mysqlsuffix}-server", override_options => { - 'mysqld' => { - 'query_cache_size' => '64M', - 'join_buffer_size' => '524288', #512K - 'tmp_table_size' => '64M', - 'max_heap_table_size' => '64M', - 'table_open_cache' => '64', - 'log-queries-not-using-indexes' => '1', - # Set a sensible default character set - 'character-set-server' => 'utf8', - 'collation-server' => 'utf8_general_ci', - # Settings for best MySQL 4-byte Unicode support - 'innodb_large_prefix' => 'true', - 'innodb_file_format' => 'barracuda', - 'innodb_file_per_table' => '1', - } + 'mysqld' => $mysqld_settings }, } $username = strip($mysqluser)