Add client package variable
The mysql client package is different on CentOS. This commit adds a parameter for the mysql client package and defaults to a variable in the mysql::params class.
This commit is contained in:
parent
c15ef0ad1b
commit
6b98633cc8
2 changed files with 16 additions and 8 deletions
|
@ -3,13 +3,18 @@
|
||||||
# this module installs mysql client software.
|
# this module installs mysql client software.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
#
|
# [*client_package_name*] - The name of the mysql client package.
|
||||||
# Actions:
|
# Actions:
|
||||||
#
|
#
|
||||||
# Requires:
|
# Requires:
|
||||||
#
|
#
|
||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class mysql {
|
class mysql(
|
||||||
package {"mysql-client": ensure => installed }
|
$client_package_name = $mysql::params::client_package_name
|
||||||
|
) inherits mysql::params {
|
||||||
|
package {"mysql-client":
|
||||||
|
name => $client_package_name,
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,16 @@ class mysql::params{
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
'centos', 'redhat', 'fedora': {
|
'centos', 'redhat', 'fedora': {
|
||||||
$service_name = 'mysqld'
|
$service_name = 'mysqld'
|
||||||
|
$client_package_name = 'mysql'
|
||||||
}
|
}
|
||||||
'ubuntu', 'debian': {
|
'ubuntu', 'debian': {
|
||||||
$service_name = 'mysql'
|
$service_name = 'mysql'
|
||||||
|
$client_package_name = 'mysql-client'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
$python_package_name = 'python-mysqldb'
|
$python_package_name = 'python-mysqldb'
|
||||||
$ruby_package_name = 'ruby-mysql'
|
$ruby_package_name = 'ruby-mysql'
|
||||||
|
$client_package_name = 'mysql'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue