Added exec to load the MySQL schema.
This commit is contained in:
parent
16ce34d7a0
commit
44c98f5fee
1 changed files with 9 additions and 1 deletions
|
@ -100,7 +100,15 @@ class icinga2::server::install::execs inherits icinga2::server {
|
|||
|
||||
case $server_db_type {
|
||||
#Schema loading for MySQL:
|
||||
'mysql': { }
|
||||
'mysql': {
|
||||
exec { 'mysql_schema_load':
|
||||
user => 'root',
|
||||
path => '/usr/bin:/usr/sbin:/bin/:/sbin',
|
||||
command => "mysql -u ${db_user} -p${db_password} ${db_name} < ${server_db_schema_path}; touch /etc/icinga2/mysql_schema_loaded.txt",
|
||||
creates => "/etc/icinga2/mysql_schema_loaded.txt",
|
||||
require => Class['icinga2::server::install::packages'],
|
||||
}
|
||||
}
|
||||
#Schema loading for Postgres:
|
||||
'pgsql': {
|
||||
exec { 'postgres_schema_load':
|
||||
|
|
Loading…
Reference in a new issue