Vagrant: Install icinga-web-mysql.

This commit is contained in:
Gunnar Beutner 2013-10-16 21:11:49 +02:00
parent 204f04f295
commit eb28adaf44
2 changed files with 8 additions and 6 deletions

View File

@ -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']
}

View File

@ -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']
}