From a110b250710ae468da5769705cf46abc16620e7f Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Tue, 5 Aug 2014 16:29:02 +0200 Subject: [PATCH] Outsource 'icingaweb' database creation into mysql::database::create refs #6842 --- .vagrant-puppet/manifests/default.pp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index b57b98b3d..da2a29884 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -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':