2014-09-02 15:30:51 +02:00
|
|
|
# Class: icinga2_mysql
|
|
|
|
#
|
|
|
|
# This class installs Icinga 2 and Icinga-2-IDO-MySQL and set up the database for the last one.
|
|
|
|
#
|
|
|
|
# Requires:
|
|
|
|
#
|
|
|
|
# icinga_packages
|
2014-09-10 12:48:22 +02:00
|
|
|
# icinga2
|
2014-09-02 15:30:51 +02:00
|
|
|
# icinga2::feature
|
2014-09-10 12:48:22 +02:00
|
|
|
# icinga2::config
|
2014-09-02 15:30:51 +02:00
|
|
|
# mysql::database::populate
|
|
|
|
#
|
|
|
|
# Sample Usage:
|
|
|
|
#
|
|
|
|
# include icinga2_mysql
|
|
|
|
#
|
2014-09-02 12:11:36 +02:00
|
|
|
class icinga2_mysql {
|
2014-09-02 15:30:51 +02:00
|
|
|
include icinga2
|
2014-09-02 12:11:36 +02:00
|
|
|
include icinga_packages
|
2014-08-28 16:56:10 +02:00
|
|
|
|
|
|
|
package { 'icinga2-ido-mysql':
|
2014-09-02 12:21:28 +02:00
|
|
|
ensure => latest,
|
2014-09-02 12:11:36 +02:00
|
|
|
require => Class['icinga_packages'],
|
2014-08-28 16:56:10 +02:00
|
|
|
}
|
2014-09-15 11:16:47 +02:00
|
|
|
-> mysql::database::populate { 'icinga2':
|
2014-09-02 12:21:28 +02:00
|
|
|
username => 'icinga2',
|
|
|
|
password => 'icinga2',
|
2014-08-22 13:37:27 +02:00
|
|
|
privileges => 'SELECT,INSERT,UPDATE,DELETE',
|
|
|
|
schemafile => '/usr/share/icinga2-ido-mysql/schema/mysql.sql',
|
|
|
|
}
|
2015-02-12 11:52:55 +01:00
|
|
|
-> icinga2::config { 'features-available/ido-mysql':
|
2014-09-10 15:14:14 +02:00
|
|
|
source => 'puppet:///modules/icinga2_mysql',
|
2014-08-22 13:37:27 +02:00
|
|
|
}
|
2015-02-12 11:52:55 +01:00
|
|
|
-> icinga2::feature { 'ido-mysql': }
|
2014-08-22 13:37:27 +02:00
|
|
|
}
|