Add parameters for the server and client package installations to specify '--no-install-recommends' on Ubuntu 14.04 and 12.04 systems, then use the parameter in the server and client plugin package installs.
This will prevent Nagios 3 from being installed and started, as nagios3 and related packages frequently come along as recommended packages for many of the Nagios plugin packages on Debian/Ubuntu systems.
This commit is contained in:
parent
f317165248
commit
3e2b330dd6
3 changed files with 12 additions and 2 deletions
|
@ -32,8 +32,9 @@ class icinga2::nrpe::install::packages inherits icinga2::nrpe {
|
|||
include icinga2::nrpe
|
||||
#Install the packages we specified in the ::params class:
|
||||
package {$icinga2::params::icinga2_client_packages:
|
||||
ensure => installed,
|
||||
provider => $icinga2::params::package_provider,
|
||||
ensure => installed,
|
||||
provider => $icinga2::params::package_provider,
|
||||
install_options => $client_plugin_package_install_options,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,11 +71,15 @@ class icinga2::params {
|
|||
'12.04': {
|
||||
$icinga2_server_package = 'icinga2'
|
||||
$icinga2_server_plugin_packages = ["nagios-plugins", "nagios-plugins-basic", "nagios-plugins-standard", "nagios-snmp-plugins", "nagios-plugins-extra", "nagios-nrpe-plugin"]
|
||||
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
||||
$server_plugin_package_install_options = '--no-install-recommends'
|
||||
}
|
||||
#...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", "nagios-nrpe-plugin"]
|
||||
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
||||
$server_plugin_package_install_options = '--no-install-recommends'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,10 +304,14 @@ class icinga2::params {
|
|||
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
||||
'12.04': {
|
||||
$icinga2_client_packages = ["nagios-nrpe-server", "nagios-plugins", "nagios-plugins-basic", "nagios-plugins-standard", "nagios-snmp-plugins", "nagios-plugins-extra", "nagios-nrpe-plugin"]
|
||||
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
||||
$client_plugin_package_install_options = '--no-install-recommends'
|
||||
}
|
||||
#...but 14.04 does:
|
||||
'14.04': {
|
||||
$icinga2_client_packages = ["nagios-nrpe-server", "nagios-plugins", "nagios-plugins-basic", "nagios-plugins-common", "nagios-plugins-standard", "nagios-snmp-plugins", "nagios-plugins-extra", "nagios-plugins-contrib", "nagios-nrpe-plugin"]
|
||||
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
||||
$client_plugin_package_install_options = '--no-install-recommends'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ class icinga2::server::install::packages inherits icinga2::server {
|
|||
package {$icinga2_server_plugin_packages:
|
||||
ensure => installed,
|
||||
provider => $package_provider,
|
||||
install_options => $server_plugin_package_install_options,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue