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:
parent
9e67b911a3
commit
7098dfe0b0
@ -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]]
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user