Install the DB connector package.
This commit is contained in:
parent
7bebc9612e
commit
51a408af92
1 changed files with 20 additions and 1 deletions
|
@ -64,17 +64,36 @@ class icinga2::server::install::repos inherits icinga2::server {
|
|||
|
||||
}
|
||||
|
||||
#Install packages for Icinga 2:
|
||||
class icinga2::server::install::packages inherits icinga2::server {
|
||||
|
||||
include icinga2::params
|
||||
|
||||
#Install the icinga2 pacakge
|
||||
#Install the Icinga 2 package
|
||||
package {$icinga2_server_package:
|
||||
ensure => installed,
|
||||
provider => $package_provider,
|
||||
}
|
||||
|
||||
#Pick the right DB lib package name based on the database type the user selected:
|
||||
case $icinga2::server::server_db_type {
|
||||
#MySQL:
|
||||
'mysql': { $icinga2_server_db_connector_package = 'icinga2-ido-mysql'}
|
||||
#Postgres:
|
||||
'pgsql': { $icinga2_server_db_connector_package = 'icinga2-ido-pgsql'}
|
||||
default: { fail("${icinga2::params::server_db_type} is not a supported database! Please specify either 'mysql' for MySQL or 'pgsql' for Postgres.") }
|
||||
}
|
||||
|
||||
#Install the IDO database connector package. See:
|
||||
#http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/getting-started#configuring-db-ido
|
||||
package {$icinga2_server_db_connector_package:
|
||||
ensure => installed,
|
||||
provider => $package_provider,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#This class contains exec resources
|
||||
class icinga2::server::install::execs inherits icinga2::server {
|
||||
|
||||
include icinga2::params
|
||||
|
|
Loading…
Reference in a new issue