mirror of https://github.com/Icinga/icinga2.git
Vagrant: Install icinga-web-mysql.
This commit is contained in:
parent
204f04f295
commit
eb28adaf44
|
@ -13,12 +13,16 @@ class icinga-web {
|
||||||
notify => Service['apache']
|
notify => Service['apache']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { 'icinga-web-mysql':
|
||||||
|
ensure => installed,
|
||||||
|
require => Class['icinga-rpm-snapshot'],
|
||||||
|
notify => Service['apache']
|
||||||
|
}
|
||||||
|
|
||||||
exec { 'create-mysql-icinga-web-db':
|
exec { 'create-mysql-icinga-web-db':
|
||||||
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
unless => 'mysql -uicinga_web -picinga_web icinga_web',
|
unless => 'mysql -uicinga_web -picinga_web icinga_web',
|
||||||
command => 'mysql -uroot -e "CREATE DATABASE icinga_web; \
|
command => 'mysql -uroot -e "CREATE DATABASE icinga_web; GRANT ALL ON icinga_web.* TO icinga_web@localhost IDENTIFIED BY \'icinga_web\';"',
|
||||||
GRANT ALL ON icinga_web.* TO icinga_web@localhost \
|
|
||||||
IDENTIFIED BY \'icinga_web\';"',
|
|
||||||
require => Service['mysqld']
|
require => Service['mysqld']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,7 @@ class icinga2-ido-mysql {
|
||||||
exec { 'create-mysql-icinga2-ido-db':
|
exec { 'create-mysql-icinga2-ido-db':
|
||||||
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
unless => 'mysql -uicinga -picinga icinga',
|
unless => 'mysql -uicinga -picinga icinga',
|
||||||
command => 'mysql -uroot -e "CREATE DATABASE icinga; \
|
command => 'mysql -uroot -e "CREATE DATABASE icinga; GRANT ALL ON icinga.* TO icinga@localhost IDENTIFIED BY \'icinga\';"',
|
||||||
GRANT ALL ON icinga.* TO icinga@localhost \
|
|
||||||
IDENTIFIED BY \'icinga\';"',
|
|
||||||
require => Service['mysqld']
|
require => Service['mysqld']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue