2026-02-10 14:04:06 +01:00
|
|
|
## confdroid_nagios::main::install.pp
|
|
|
|
|
# Module name: confdroid_nagios
|
|
|
|
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
2026-02-11 17:46:37 +01:00
|
|
|
# @summary Class manages installation matters for the confdroid_nagios module.
|
2026-02-10 14:04:06 +01:00
|
|
|
###############################################################################
|
|
|
|
|
class confdroid_nagios::main::install (
|
|
|
|
|
|
|
|
|
|
) inherits confdroid_nagios::params {
|
2026-02-13 15:27:27 +01:00
|
|
|
require confdroid_resources
|
|
|
|
|
|
2026-02-10 14:04:06 +01:00
|
|
|
if $ng_nagios_server == $fqdn {
|
2026-02-11 17:34:45 +01:00
|
|
|
# if our FQDN matches the configured Nagios server FQDN, install both server-
|
2026-02-13 14:57:03 +01:00
|
|
|
# and client packages.We'll need httpd installed
|
2026-02-13 13:46:27 +01:00
|
|
|
require confdroid_apache
|
2026-02-11 17:34:45 +01:00
|
|
|
|
2026-02-13 14:04:37 +01:00
|
|
|
package { $ng_reqpackages_server:
|
2026-02-13 13:46:27 +01:00
|
|
|
ensure => $ng_pkg_ensure,
|
|
|
|
|
}
|
2026-02-13 14:04:37 +01:00
|
|
|
package { $ng_reqpackages_client:
|
2026-02-13 13:46:27 +01:00
|
|
|
ensure => $ng_pkg_ensure,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# if we are not the nagios server, install only client packages
|
|
|
|
|
if $fqdn != $ng_nagios_server {
|
2026-02-13 15:27:27 +01:00
|
|
|
package { $ng_reqpackages_client:
|
|
|
|
|
ensure => $ng_pkg_ensure,
|
2026-02-13 13:46:27 +01:00
|
|
|
}
|
|
|
|
|
|
2026-02-13 14:57:03 +01:00
|
|
|
# if we want to use NRPE on clients, install it
|
2026-02-13 13:46:27 +01:00
|
|
|
if $ng_include_nrpe == true {
|
|
|
|
|
require cd_nrpe
|
2026-02-11 17:34:45 +01:00
|
|
|
}
|
2026-02-10 14:04:06 +01:00
|
|
|
}
|
|
|
|
|
}
|