From e0e797e480949ffef73f92861f77fa4a9066e623 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 26 Nov 2014 12:11:46 -0800 Subject: [PATCH 1/2] Revert "Default to MariaDB for SLES 12" SLES belongs in the Suse family, not the RedHat family. This reverts commit 8cc0083d6e58b21328504d8de9c02a497dd93a11. --- manifests/params.pp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index b7c8cc30f..e46ab98ef 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -45,13 +45,6 @@ $provider = 'mysql' } } - 'SLES': { - if $::operatingsystemmajrelease >= 12 { - $provider = 'mariadb' - } else { - $provider = 'mysql' - } - } default: { $provider = 'mysql' } From 25b65342b30c6d0df12fc38fb475faf991484b61 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 26 Nov 2014 12:57:16 -0800 Subject: [PATCH 2/2] Add support for SLES 12 SLES 12 has different package names for the server and client. It also doesn't seem to want to start if basedir is defined. --- manifests/params.pp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index e46ab98ef..db0bc1274 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -88,15 +88,27 @@ } 'Suse': { - $client_package_name = $::operatingsystem ? { - /OpenSuSE/ => 'mysql-community-server-client', - /(SLES|SLED)/ => 'mysql-client', - } - $server_package_name = $::operatingsystem ? { - /OpenSuSE/ => 'mysql-community-server', - /(SLES|SLED)/ => 'mysql', + case $::operatingsystem { + 'OpenSuSE': { + $client_package_name = 'mysql-community-server-client' + $server_package_name = 'mysql-community-server' + $basedir = '/usr' + } + 'SLES','SLED': { + if $::operatingsystemmajrelease >= 12 { + $client_package_name = 'mariadb-client' + $server_package_name = 'mariadb' + $basedir = undef + } else { + $client_package_name = 'mysql-client' + $server_package_name = 'mysql' + $basedir = '/usr' + } + } + default: { + fail("Unsupported platform: puppetlabs-${module_name} currently doesn't support ${::operatingsystem}") + } } - $basedir = '/usr' $config_file = '/etc/my.cnf' $includedir = '/etc/my.cnf.d' $datadir = '/var/lib/mysql'