You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.9 KiB
92 lines
2.9 KiB
10 years ago
|
# Class: mysql::params
|
||
|
#
|
||
|
# The mysql configuration settings.
|
||
|
#
|
||
|
# Parameters:
|
||
|
#
|
||
|
# Actions:
|
||
|
#
|
||
|
# Requires:
|
||
|
#
|
||
|
# Sample Usage:
|
||
|
#
|
||
|
class mysql::params {
|
||
|
|
||
|
$bind_address = '127.0.0.1'
|
||
|
$port = 3306
|
||
|
$etc_root_password = false
|
||
|
$ssl = false
|
||
|
|
||
|
case $::operatingsystem {
|
||
|
"Ubuntu": {
|
||
|
$service_provider = upstart
|
||
|
}
|
||
|
default: {
|
||
|
$service_provider = undef
|
||
|
}
|
||
|
}
|
||
|
|
||
|
case $::osfamily {
|
||
|
'RedHat': {
|
||
|
$basedir = '/usr'
|
||
|
$datadir = '/var/lib/mysql'
|
||
|
$service_name = 'mysqld'
|
||
|
$client_package_name = 'mysql'
|
||
|
$server_package_name = 'mysql-server'
|
||
|
$socket = '/var/lib/mysql/mysql.sock'
|
||
|
$config_file = '/etc/my.cnf'
|
||
|
$log_error = '/var/log/mysqld.log'
|
||
|
$ruby_package_name = 'ruby-mysql'
|
||
|
$ruby_package_provider = 'gem'
|
||
|
$python_package_name = 'MySQL-python'
|
||
|
$java_package_name = 'mysql-connector-java'
|
||
|
$root_group = 'root'
|
||
|
$ssl_ca = '/etc/mysql/cacert.pem'
|
||
|
$ssl_cert = '/etc/mysql/server-cert.pem'
|
||
|
$ssl_key = '/etc/mysql/server-key.pem'
|
||
|
}
|
||
|
|
||
|
'Debian': {
|
||
|
$basedir = '/usr'
|
||
|
$datadir = '/var/lib/mysql'
|
||
|
$service_name = 'mysql'
|
||
|
$client_package_name = 'mysql-client'
|
||
|
$server_package_name = 'mysql-server'
|
||
|
$socket = '/var/run/mysqld/mysqld.sock'
|
||
|
$config_file = '/etc/mysql/my.cnf'
|
||
|
$log_error = '/var/log/mysql/error.log'
|
||
|
$ruby_package_name = 'libmysql-ruby'
|
||
|
$python_package_name = 'python-mysqldb'
|
||
|
$java_package_name = 'libmysql-java'
|
||
|
$root_group = 'root'
|
||
|
$ssl_ca = '/etc/mysql/cacert.pem'
|
||
|
$ssl_cert = '/etc/mysql/server-cert.pem'
|
||
|
$ssl_key = '/etc/mysql/server-key.pem'
|
||
|
}
|
||
|
|
||
|
'FreeBSD': {
|
||
|
$basedir = '/usr/local'
|
||
|
$datadir = '/var/db/mysql'
|
||
|
$service_name = 'mysql-server'
|
||
|
$client_package_name = 'databases/mysql55-client'
|
||
|
$server_package_name = 'databases/mysql55-server'
|
||
|
$socket = '/tmp/mysql.sock'
|
||
|
$config_file = '/var/db/mysql/my.cnf'
|
||
|
$log_error = "/var/db/mysql/${::hostname}.err"
|
||
|
$ruby_package_name = 'ruby-mysql'
|
||
|
$ruby_package_provider = 'gem'
|
||
|
$python_package_name = 'databases/py-MySQLdb'
|
||
|
$java_package_name = 'databases/mysql-connector-java'
|
||
|
$root_group = 'wheel'
|
||
|
$ssl_ca = undef
|
||
|
$ssl_cert = undef
|
||
|
$ssl_key = undef
|
||
|
}
|
||
|
|
||
|
default: {
|
||
|
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat Debian and FreeBSD")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|