Skip to content

Commit

Permalink
Add support for SLES 12
Browse files Browse the repository at this point in the history
SLES 12 has different package names for the server and client. It also
doesn't seem to want to start if basedir is defined.
  • Loading branch information
Colleen Murphy committed Nov 26, 2014
1 parent e0e797e commit 25b6534
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 25b6534

Please sign in to comment.