database/sql: run bootstrap-mysql before mysql start

Replace notify by before to ensure that we bootstrap mysql database
before trying to run mysql.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-08-08 18:00:49 +02:00
parent 9e67b911a3
commit 7098dfe0b0
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ class cloud::database::sql (
exec { 'bootstrap-mysql':
command => '/usr/bin/mysql_install_db --rpm --user=mysql',
unless => 'test -d /var/lib/mysql/mysql',
notify => Service['mysqld'],
before => Service['mysqld'],
require => [Package['mysql-server'], File[$mysql_server_config_file]]
}

View File

@ -208,7 +208,7 @@ describe 'cloud::database::sql' do
should contain_exec('bootstrap-mysql').with(
:command => '/usr/bin/mysql_install_db --rpm --user=mysql',
:unless => "test -d /var/lib/mysql/mysql",
:notify => 'Service[mysqld]'
:before => 'Service[mysqld]'
)
end
end