module-puppetlabs-mysql/manifests/server/installdb.pp
Monty Solomon d472d5bcf1 Use defaults_extra_file first; add debug messages
Remove added notices and revert to debug

Add support for Percona

Use log-error for mysqld initialize

Improve description of error log argument

Should be --log-error
2016-04-21 01:00:40 -04:00

35 lines
990 B
Puppet

#
class mysql::server::installdb {
if $mysql::server::package_manage {
# Build the initial databases.
$mysqluser = $mysql::server::options['mysqld']['user']
$datadir = $mysql::server::options['mysqld']['datadir']
$basedir = $mysql::server::options['mysqld']['basedir']
$config_file = $mysql::server::config_file
$log_error = $mysql::server::options['mysqld']['log-error']
if $mysql::server::manage_config_file and $config_file != $mysql::params::config_file {
$_config_file=$config_file
} else {
$_config_file=undef
}
mysql_datadir { $datadir:
ensure => 'present',
datadir => $datadir,
basedir => $basedir,
user => $mysqluser,
log_error => $log_error,
defaults_extra_file => $_config_file,
}
if $mysql::server::restart {
Mysql_datadir[$datadir] {
notify => Class['mysql::server::service'],
}
}
}
}