Add parameters for Nagios plugin pacakges and install them with a package resource in the icinga2::server::packages class so we can get the Nagios plugin packages Icinga 2 servers.
This commit is contained in:
parent
70e0f29dfc
commit
33ff28b86d
2 changed files with 19 additions and 2 deletions
|
@ -57,12 +57,23 @@ class icinga2::params {
|
|||
'RedHat', 'CentOS': {
|
||||
#Icinga 2 server package
|
||||
$icinga2_server_package = 'icinga2'
|
||||
$icinga2_server_plugin_packages = ["nagios-plugins-nrpe", "nagios-plugins-all", "nagios-plugins-openmanage", "nagios-plugins-check-updates"]
|
||||
}
|
||||
|
||||
#Debian/Ubuntu systems:
|
||||
/^(Debian|Ubuntu)$/: {
|
||||
#Icinga 2 server package
|
||||
$icinga2_server_package = 'icinga2'
|
||||
case $operatingsystemrelease {
|
||||
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
||||
'12.04': {
|
||||
$icinga2_server_package = 'icinga2'
|
||||
$icinga2_server_plugin_packages = ["nagios-plugins", "nagios-plugins-basic", "nagios-plugins-standard", "nagios-snmp-plugins", "nagios-plugins-extra"]
|
||||
}
|
||||
#...but 14.04 does:
|
||||
'14.04': {
|
||||
$icinga2_server_package = 'icinga2'
|
||||
$icinga2_server_plugin_packages = ["nagios-plugins", "nagios-plugins-basic", "nagios-plugins-common", "nagios-plugins-standard", "nagios-snmp-plugins", "nagios-plugins-extra", "nagios-plugins-contrib"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Fail if we're on any other OS:
|
||||
|
|
|
@ -75,6 +75,12 @@ class icinga2::server::install::packages inherits icinga2::server {
|
|||
provider => $package_provider,
|
||||
}
|
||||
|
||||
#Install the Nagios plugins packages:
|
||||
package {$icinga2_server_plugin_packages:
|
||||
ensure => installed,
|
||||
provider => $package_provider,
|
||||
}
|
||||
|
||||
#Pick the right DB lib package name based on the database type the user selected:
|
||||
case $server_db_type {
|
||||
#MySQL:
|
||||
|
|
Loading…
Reference in a new issue