Outsource 'icingaweb' database creation into mysql::database::create

refs #6842
This commit is contained in:
Alexander Klimov 2014-08-05 16:29:02 +02:00
parent 73a29abac3
commit a110b25071

View File

@ -573,12 +573,10 @@ populate_monitoring_test_config_plugins{ ['test_hostcheck.pl', 'test_servicechec
# #
# Following section creates and populates MySQL and PostgreSQL Icinga Web 2 databases # Following section creates and populates MySQL and PostgreSQL Icinga Web 2 databases
# #
exec { 'create-mysql-icingaweb-db': mysql::database::create { 'icingaweb':
unless => 'mysql -uicingaweb -picingaweb icingaweb', username => 'icingaweb',
command => 'mysql -uroot -e "CREATE DATABASE icingaweb; \ password => 'icingaweb',
GRANT ALL ON icingaweb.* TO icingaweb@localhost \ privileges => 'ALL',
IDENTIFIED BY \'icingaweb\';"',
require => Service['mysqld']
} }
pgsql::database::create { 'icingaweb': pgsql::database::create { 'icingaweb':