diff --git a/manifests/params.pp b/manifests/params.pp index b7c8cc30f..db0bc1274 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' } @@ -95,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'