diff --git a/.vagrant-puppet/modules/icinga-web/manifests/init.pp b/.vagrant-puppet/modules/icinga-web/manifests/init.pp index 4d1483600..d017ae947 100644 --- a/.vagrant-puppet/modules/icinga-web/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga-web/manifests/init.pp @@ -13,12 +13,16 @@ class icinga-web { notify => Service['apache'] } + package { 'icinga-web-mysql': + ensure => installed, + require => Class['icinga-rpm-snapshot'], + notify => Service['apache'] + } + exec { 'create-mysql-icinga-web-db': path => '/bin:/usr/bin:/sbin:/usr/sbin', unless => 'mysql -uicinga_web -picinga_web icinga_web', - command => 'mysql -uroot -e "CREATE DATABASE icinga_web; \ - GRANT ALL ON icinga_web.* TO icinga_web@localhost \ - IDENTIFIED BY \'icinga_web\';"', + command => 'mysql -uroot -e "CREATE DATABASE icinga_web; GRANT ALL ON icinga_web.* TO icinga_web@localhost IDENTIFIED BY \'icinga_web\';"', require => Service['mysqld'] } diff --git a/.vagrant-puppet/modules/icinga2/manifests/init.pp b/.vagrant-puppet/modules/icinga2/manifests/init.pp index 2b909e5fd..8e410678c 100644 --- a/.vagrant-puppet/modules/icinga2/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga2/manifests/init.pp @@ -45,9 +45,7 @@ class icinga2-ido-mysql { exec { 'create-mysql-icinga2-ido-db': path => '/bin:/usr/bin:/sbin:/usr/sbin', unless => 'mysql -uicinga -picinga icinga', - command => 'mysql -uroot -e "CREATE DATABASE icinga; \ - GRANT ALL ON icinga.* TO icinga@localhost \ - IDENTIFIED BY \'icinga\';"', + command => 'mysql -uroot -e "CREATE DATABASE icinga; GRANT ALL ON icinga.* TO icinga@localhost IDENTIFIED BY \'icinga\';"', require => Service['mysqld'] }