2011-06-01 05:47:19 +02:00
# Class : mysql: : params
#
2012-02-09 20:26:00 +01:00
# The mysql configuration settings.
2011-06-01 05:47:19 +02:00
#
# Parameters:
#
# Actions:
#
# Requires :
#
# Sample Usage:
#
2012-02-09 20:26:00 +01:00
class mysql: : params {
2012-08-16 03:03:37 +02:00
$b ind_address = '127.0.0.1'
$ port = 3 3 0 6
$e tc_root_password = false
$ ssl = false
2012-09-08 12:09:44 +02:00
$ restart = true
2012-02-09 20:26:00 +01:00
2012-03-16 23:56:04 +01:00
case $ : : operatingsystem {
2012-09-04 15:59:47 +02:00
'Ubuntu' : {
2012-03-16 23:56:04 +01:00
$ service_provider = upstart
}
default : {
$ service_provider = undef
}
}
2012-02-09 20:26:00 +01:00
case $ : : osfamily {
'RedHat' : {
2012-05-02 06:42:34 +02:00
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
2012-02-09 20:26:00 +01:00
$ service_name = 'mysqld'
$c lient_package_name = 'mysql'
2012-05-02 06:42:34 +02:00
$ server_package_name = 'mysql-server'
2012-02-09 20:26:00 +01:00
$ socket = '/var/lib/mysql/mysql.sock'
2012-08-22 03:09:48 +02:00
$ pidfile = '/var/run/mysqld/mysqld.pid'
2012-02-09 20:26:00 +01:00
$c onfig_file = '/etc/my.cnf'
2012-04-12 02:06:35 +02:00
$ log_error = '/var/log/mysqld.log'
2012-02-09 20:26:00 +01:00
$ ruby_package_name = 'ruby-mysql'
$ ruby_package_provider = 'gem'
$ python_package_name = 'MySQL-python'
2013-01-04 19:59:17 +01:00
$ php_package_name = 'php-mysql'
2012-04-24 06:24:01 +02:00
$ java_package_name = 'mysql-connector-java'
2012-05-02 06:42:34 +02:00
$ root_group = 'root'
$ ssl_ca = '/etc/mysql/cacert.pem'
$ ssl_cert = '/etc/mysql/server-cert.pem'
$ ssl_key = '/etc/mysql/server-key.pem'
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
'Debian' : {
2012-05-02 06:42:34 +02:00
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
2011-06-17 00:34:04 +02:00
$ service_name = 'mysql'
$c lient_package_name = 'mysql-client'
2012-05-02 06:42:34 +02:00
$ server_package_name = 'mysql-server'
2012-01-11 02:16:32 +01:00
$ socket = '/var/run/mysqld/mysqld.sock'
2012-08-22 03:09:48 +02:00
$ pidfile = '/var/run/mysqld/mysqld.pid'
2012-01-11 02:16:32 +01:00
$c onfig_file = '/etc/mysql/my.cnf'
2012-04-12 02:06:35 +02:00
$ log_error = '/var/log/mysql/error.log'
2012-01-11 20:01:02 +01:00
$ ruby_package_name = 'libmysql-ruby'
$ python_package_name = 'python-mysqldb'
2013-01-04 19:59:17 +01:00
$ php_package_name = 'php5-mysql'
2012-04-24 06:24:01 +02:00
$ java_package_name = 'libmysql-java'
2012-05-02 06:42:34 +02:00
$ root_group = 'root'
$ ssl_ca = '/etc/mysql/cacert.pem'
$ ssl_cert = '/etc/mysql/server-cert.pem'
$ ssl_key = '/etc/mysql/server-key.pem'
}
'FreeBSD' : {
$ba sedir = '/usr/local'
$da tadir = '/var/db/mysql'
$ service_name = 'mysql-server'
$c lient_package_name = 'databases/mysql55-client'
$ server_package_name = 'databases/mysql55-server'
$ socket = '/tmp/mysql.sock'
2012-08-22 03:09:48 +02:00
$ pidfile = '/var/db/mysql/mysql.pid'
2012-05-02 06:42:34 +02:00
$c onfig_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'
2013-01-04 19:59:17 +01:00
$ php_package_name = 'php5-mysql'
2012-05-02 06:42:34 +02:00
$ java_package_name = 'databases/mysql-connector-java'
$ root_group = 'wheel'
$ ssl_ca = undef
$ ssl_cert = undef
$ ssl_key = undef
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
2012-01-11 19:31:34 +01:00
default : {
2012-04-02 11:30:20 +02:00
case $ : : operatingsystem {
'Amazon' : {
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
$ service_name = 'mysqld'
$c lient_package_name = 'mysql'
$ server_package_name = 'mysql-server'
$ socket = '/var/lib/mysql/mysql.sock'
$c onfig_file = '/etc/my.cnf'
$ log_error = '/var/log/mysqld.log'
$ ruby_package_name = 'ruby-mysql'
$ ruby_package_provider = 'gem'
$ python_package_name = 'MySQL-python'
2013-01-04 19:59:17 +01:00
$ php_package_name = 'php-mysql'
2012-04-02 11:30:20 +02:00
$ 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'
}
2012-08-14 19:09:33 +02:00
default : {
fail( "Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat, Debian, and FreeBSD, or operatingsystem Amazon" )
}
2012-04-02 11:30:20 +02:00
}
2012-01-11 19:31:34 +01:00
}
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
2011-05-25 08:22:43 +02:00
}