diff --git a/manifests/server/installdb.pp b/manifests/server/installdb.pp index 31a2546..41a0d5b 100644 --- a/manifests/server/installdb.pp +++ b/manifests/server/installdb.pp @@ -1,5 +1,6 @@ # class mysql::server::installdb { + $options = $mysql::server::options if $mysql::server::package_manage { @@ -16,6 +17,15 @@ class mysql::server::installdb { $_config_file=undef } + if $options['mysqld']['log-error'] { + file { $options['mysqld']['log-error']: + ensure => present, + owner => $mysqluser, + group => $::mysql::server::mysql_group, + before => Mysql_datadir[ $datadir ], + } + } + mysql_datadir { $datadir: ensure => 'present', datadir => $datadir, diff --git a/manifests/server/service.pp b/manifests/server/service.pp index 9aa60f1..3617b4b 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -18,14 +18,6 @@ class mysql::server::service { $mysqluser = $options['mysqld']['user'] } - if $options['mysqld']['log-error'] { - file { $options['mysqld']['log-error']: - ensure => present, - owner => $mysqluser, - group => $::mysql::server::mysql_group, - } - } - if $mysql::server::real_service_manage { service { 'mysqld': ensure => $service_ensure,