module-puppetlabs-mysql/manifests/server/installdb.pp
Travis Fields ac6ae7140e (maint) Package was renamed in server::install
- As a result of rename several underlying dependencies broke
  this is to update the require dependencies
2015-06-18 13:55:22 -07:00

32 lines
946 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
if $mysql::server::manage_config_file {
$install_db_args = "--basedir=${basedir} --defaults-extra-file=${config_file} --datadir=${datadir} --user=${mysqluser}"
}
exec { 'mysql_install_db':
command => "mysql_install_db ${install_db_args}",
creates => "${datadir}/mysql",
logoutput => on_failure,
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
require => Package['mysql-server'],
}
if $mysql::server::restart {
Exec['mysql_install_db'] {
notify => Class['mysql::server::service'],
}
}
}
}