diff --git a/manifests/init.pp b/manifests/init.pp index edd71c8..250aa95 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -3,13 +3,18 @@ # this module installs mysql client software. # # Parameters: -# +# [*client_package_name*] - The name of the mysql client package. # Actions: # # Requires: # # Sample Usage: # -class mysql { - package {"mysql-client": ensure => installed } +class mysql( + $client_package_name = $mysql::params::client_package_name +) inherits mysql::params { + package {"mysql-client": + name => $client_package_name, + ensure => installed, + } } diff --git a/manifests/params.pp b/manifests/params.pp index 2a1fd33..3acb7d0 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,17 +12,20 @@ # Sample Usage: # class mysql::params{ - $socket = '/var/run/mysqld/mysqld.sock' + $socket = '/var/run/mysqld/mysqld.sock' case $operatingsystem { 'centos', 'redhat', 'fedora': { - $service_name = 'mysqld' + $service_name = 'mysqld' + $client_package_name = 'mysql' } 'ubuntu', 'debian': { - $service_name = 'mysql' + $service_name = 'mysql' + $client_package_name = 'mysql-client' } default: { - $python_package_name = 'python-mysqldb' - $ruby_package_name = 'ruby-mysql' + $python_package_name = 'python-mysqldb' + $ruby_package_name = 'ruby-mysql' + $client_package_name = 'mysql' } } }