Files
confdroid_nagios/manifests/params.pp
2026-02-12 16:54:29 +01:00

65 lines
2.8 KiB
Puppet

## confdroid_nagios::params.pp
# Module name: confdroid_nagios
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class holds all parameters for the confdroid_nagios module and is
# inherited by all classes except defines.
# @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'.
# @param [String] ng_user The name of the Nagios user to be created on the
# Nagios server. Default is 'nagios'.
# @param [String] ng_u_comment The comment field for the Nagios user. Default
# is 'Nagios User'.
# @param [String] ng_u_groups The group(s) to which the Nagios user should be added. Default is 'nagios'.
# @param [String] ng_u_shell The login shell for the Nagios user. Default is '/sbin/nologin'.
# @param [String] ng_user_home The home directory for the Nagios user. Default is '/home/nagios'.
# @param [Integer] ng_u_uid The user ID for the Nagios user. Default is 1004.
###############################################################################
class confdroid_nagios::params (
# main
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',
# user
String $ng_user = 'nagios',
String $ng_u_comment = 'Nagios User',
String $ng_u_groups = 'nagios',
String $ng_u_shell = '/sbin/nologin',
String $ng_user_home = '/home/nagios',
Integer $ng_u_uid = 1004,
) {
# Default facts
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
# 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'
# includes must be last
include confdroid_nagios::main::config
}