OP#421 try global parameter

This commit is contained in:
2026-02-13 16:09:32 +01:00
parent 1856fcc6b6
commit b6c9f3d83c
3 changed files with 3 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ class confdroid_nrpe::firewall::iptables (
) inherits confdroid_nrpe::params { ) inherits confdroid_nrpe::params {
if $ne_incl_fw == true { if $ne_incl_fw == true {
firewall { "${ne_fw_order_no}${ne_nrpe_port} port ${ne_nrpe_port}": firewall { "${ne_fw_order_no}${ne_nrpe_port} port ${ne_nrpe_port}":
source => $ne_nagios_server, source => $nagios_server,
proto => 'tcp', proto => 'tcp',
dport => $ne_nrpe_port, dport => $ne_nrpe_port,
jump => 'accept', jump => 'accept',

View File

@@ -16,9 +16,6 @@
# and configuration file. # and configuration file.
# @param [String] ne_listen_queue_size Listen queue size (backlog) for # @param [String] ne_listen_queue_size Listen queue size (backlog) for
# serving incoming connections. # serving incoming connections.
# @param [String] ne_nagios_server ipaddress of the nagios server to be allowed
# to connect to NRPE service. Default is to look up a global parameter from
# ENC.
# @param [String] ne_dont_blame_nrpe whether or not the NRPE daemon will # @param [String] ne_dont_blame_nrpe whether or not the NRPE daemon will
# allow clients to specify arguments to commands that are executed. # allow clients to specify arguments to commands that are executed.
# @param [String] ne_allow_bash_cmd_subst whether or not the NRPE daemon will # @param [String] ne_allow_bash_cmd_subst whether or not the NRPE daemon will
@@ -100,7 +97,6 @@ class confdroid_nrpe::params (
String $ne_nrpe_port = '5666', String $ne_nrpe_port = '5666',
String $ne_server_address = '0.0.0.0', String $ne_server_address = '0.0.0.0',
String $ne_listen_queue_size = '5', String $ne_listen_queue_size = '5',
String $ne_nagios_server = 'nagios.example.net',
String $ne_dont_blame_nrpe = '1', String $ne_dont_blame_nrpe = '1',
String $ne_allow_bash_cmd_subst = '1', String $ne_allow_bash_cmd_subst = '1',
Boolean $ne_allow_sudo = true, Boolean $ne_allow_sudo = true,
@@ -134,6 +130,7 @@ class confdroid_nrpe::params (
$domain = $facts['networking']['domain'] $domain = $facts['networking']['domain']
$os_name = $facts['os']['name'] $os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major'] $os_release = $facts['os']['release']['major']
$nagios_server = $facts['nagios_server']
# service # service
$ne_service = 'nrpe' $ne_service = 'nrpe'

View File

@@ -14,14 +14,13 @@ debug=<%= @ne_debug %>
pid_file=<%= @ne_nrpe_pid_file %> pid_file=<%= @ne_nrpe_pid_file %>
server_port=<%= @ne_nrpe_port %> server_port=<%= @ne_nrpe_port %>
server_address=<%= @ne_server_address %> server_address=<%= @ne_server_address %>
listen_queue_size=<%= @ne_listen_queue_size %> listen_queue_size=<%= @ne_listen_queue_size %>
nrpe_user=<%= @ne_user %> nrpe_user=<%= @ne_user %>
nrpe_group=<%= @ne_user %> nrpe_group=<%= @ne_user %>
allowed_hosts=127.0.0.1,::1,<%= @ne_nagios_server %> allowed_hosts=127.0.0.1,::1,<%= @nagios_server %>
dont_blame_nrpe=<%= @ne_dont_blame_nrpe %> dont_blame_nrpe=<%= @ne_dont_blame_nrpe %>
allow_bash_command_substitution=<%= @ne_allow_bash_cmd_subst %> allow_bash_command_substitution=<%= @ne_allow_bash_cmd_subst %>