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
#
exec { 'create-mysql-icingaweb-db':
unless => 'mysql -uicingaweb -picingaweb icingaweb',
command => 'mysql -uroot -e "CREATE DATABASE icingaweb; \
GRANT ALL ON icingaweb.* TO icingaweb@localhost \
IDENTIFIED BY \'icingaweb\';"',
require => Service['mysqld']
mysql::database::create { 'icingaweb':
username => 'icingaweb',
password => 'icingaweb',
privileges => 'ALL',
}
pgsql::database::create { 'icingaweb':