OP#421 add install section
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Readme
|
||||
|
||||
|
||||
[](https://jenkins.confdroid.com/job/confdroid_nrpe/)
|
||||
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_nagios)
|
||||
|
||||
- [Readme](#readme)
|
||||
- [Synopsis](#synopsis)
|
||||
@@ -37,8 +38,6 @@ See the full Puppet documentation including parameters in `docs/index.html`
|
||||
|
||||
All dependencies must be included in the catalogue.
|
||||
|
||||
|
||||
|
||||
## Deployment
|
||||
|
||||
* native Puppet deployment
|
||||
@@ -81,8 +80,8 @@ All files and directories are configured with correct selinux context. If selinu
|
||||
|
||||
## Contact Us
|
||||
|
||||
[contact Us](https://confdroid.com/contact/)
|
||||
[Feedback portal](https://feedback.confdroid.com/)
|
||||
* [contact Us](https://confdroid.com/contact/)
|
||||
* [Feedback Portal](https://feedback.confdroid.com/)
|
||||
|
||||
## Disclaimer
|
||||
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
## confdroid_nagios::main::install.pp
|
||||
# Module name: confdroid_nagios
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||
# @summary Class manages main configuration for the confdroid_nagios module.
|
||||
###############################################################################
|
||||
class confdroid_nagios::main::install (
|
||||
|
||||
) inherits confdroid_nagios::params {
|
||||
if $ng_nagios_server == $fqdn {
|
||||
#config here
|
||||
require confdroid_resources
|
||||
# if our FQDN matches the configured Nagios server FQDN, install both server-
|
||||
# and client packages.
|
||||
if $fqdn == $ng_nagios_server {
|
||||
# we'll need httpd installed
|
||||
require confdroid_apache
|
||||
|
||||
package {$ng_reqpackages_server:
|
||||
ensure => $ng_pkg_ensure,
|
||||
}
|
||||
package {$ng_reqpackages_client:
|
||||
ensure => $ng_pkg_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,36 @@
|
||||
# @param [String] ng_nagios_server The hostname or IP address of the
|
||||
# Nagios server. This will determine the installation selection and the
|
||||
# of the clients to connect to the Nagios server.
|
||||
# @param [Array] ng_reqpackages_server An array of packages to be installed on
|
||||
# the Nagios server.
|
||||
# @param [Array] ng_reqpackages_client An array of packages to be installed on
|
||||
# the Nagios clients.
|
||||
# @param [String] ng_pkg_ensure The ensure value for all packages. Default is
|
||||
# 'present'.
|
||||
###############################################################################
|
||||
class confdroid_nagios::params (
|
||||
|
||||
# main
|
||||
String $ng_nagios_server = 'nagios.example.net',
|
||||
String $ng_nagios_server = 'nagios.example.net',
|
||||
Array $ng_reqpackages_server = ['nagios','nagios-devel'],
|
||||
Array $ng_reqpackages_client = ['net-snmp-utils','nagios-plugins','nagios-plugins-all','nagios-plugins-nrpe','nagios-common'],
|
||||
String $ng_pkg_ensure = 'present',
|
||||
|
||||
) {
|
||||
# service
|
||||
$ng_service = 'nagios'
|
||||
$ae_service = 'httpd'
|
||||
|
||||
# directories
|
||||
$ng_main_dir = '/etc/nagios'
|
||||
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
||||
$ng_objects_dir = "${ng_main_dir}/objects"
|
||||
$ng_private_dir = "${ng_main_dir}/private"
|
||||
$ng_usr_incl = '/usr/include/nagios'
|
||||
$ng_lib_dir = '/usr/lib64/nagios'
|
||||
$ng_log_dir = '/var/log/nagios'
|
||||
$ng_log_archives = "${ng_log_dir}/archives"
|
||||
$ng_spool_dir = '/var/spool/nagios'
|
||||
|
||||
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user