2014-06-28 06:39:42 +02:00
|
|
|
# == Class: icinga2::params
|
|
|
|
#
|
|
|
|
# This class contains config options and settings for use elsewhere in the module.
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# See the inline comments.
|
|
|
|
#
|
|
|
|
|
|
|
|
class icinga2::params {
|
|
|
|
|
2014-06-29 06:25:51 +02:00
|
|
|
##############################
|
2014-07-05 21:20:31 +02:00
|
|
|
# Icinga 2 server parameters
|
2014-06-29 06:25:51 +02:00
|
|
|
##############################
|
|
|
|
|
|
|
|
#Whether to manage the package repositories
|
2014-06-29 07:04:08 +02:00
|
|
|
$manage_repos = 'true'
|
2014-06-30 08:04:56 +02:00
|
|
|
$server_db_type = 'pgsql'
|
2014-07-05 21:21:41 +02:00
|
|
|
|
2014-07-03 04:53:53 +02:00
|
|
|
#Database paramters
|
|
|
|
$db_name = 'icinga2_data'
|
|
|
|
$db_user = 'icinga2'
|
|
|
|
$db_password = 'password'
|
|
|
|
$db_host = 'localhost'
|
2014-07-05 21:21:41 +02:00
|
|
|
|
2014-06-29 06:25:51 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 server package parameters
|
|
|
|
|
2014-06-30 08:04:56 +02:00
|
|
|
#Pick the right package and package provider parameters based on the OS:
|
2014-06-29 06:25:51 +02:00
|
|
|
case $operatingsystem {
|
|
|
|
#Red Hat/CentOS systems:
|
|
|
|
'RedHat', 'CentOS': {
|
|
|
|
#Pick the right package provider:
|
|
|
|
$package_provider = 'yum'
|
|
|
|
#Icinga 2 server package
|
|
|
|
$icinga2_server_package = 'icinga2'
|
|
|
|
}
|
|
|
|
|
|
|
|
#Debian/Ubuntu systems:
|
|
|
|
/^(Debian|Ubuntu)$/: {
|
|
|
|
#Pick the right package provider:
|
|
|
|
$package_provider = 'apt'
|
|
|
|
#Icinga 2 server package
|
|
|
|
$icinga2_server_package = 'icinga2'
|
|
|
|
}
|
|
|
|
|
|
|
|
#Fail if we're on any other OS:
|
|
|
|
default: { fail("${operatingsystem} is not supported!") }
|
|
|
|
}
|
|
|
|
|
2014-06-28 06:39:42 +02:00
|
|
|
}
|