diff --git a/manifests/firewall/iptables.pp b/manifests/firewall/iptables.pp index 6d07fda..6e309e0 100644 --- a/manifests/firewall/iptables.pp +++ b/manifests/firewall/iptables.pp @@ -9,7 +9,7 @@ class confdroid_nrpe::firewall::iptables ( ) inherits confdroid_nrpe::params { if $ne_incl_fw == true { firewall { "${ne_fw_order_no}${ne_nrpe_port} port ${ne_nrpe_port}": - source => $ne_nagios_server, + source => $nagios_server, proto => 'tcp', dport => $ne_nrpe_port, jump => 'accept', diff --git a/manifests/params.pp b/manifests/params.pp index 11d0d11..05d4833 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -16,9 +16,6 @@ # and configuration file. # @param [String] ne_listen_queue_size Listen queue size (backlog) for # 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 # allow clients to specify arguments to commands that are executed. # @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_server_address = '0.0.0.0', String $ne_listen_queue_size = '5', - String $ne_nagios_server = 'nagios.example.net', String $ne_dont_blame_nrpe = '1', String $ne_allow_bash_cmd_subst = '1', Boolean $ne_allow_sudo = true, @@ -134,6 +130,7 @@ class confdroid_nrpe::params ( $domain = $facts['networking']['domain'] $os_name = $facts['os']['name'] $os_release = $facts['os']['release']['major'] + $nagios_server = $facts['nagios_server'] # service $ne_service = 'nrpe' diff --git a/templates/nrpe_cfg.erb b/templates/nrpe_cfg.erb index 78c9bad..7cff1f4 100644 --- a/templates/nrpe_cfg.erb +++ b/templates/nrpe_cfg.erb @@ -14,14 +14,13 @@ debug=<%= @ne_debug %> pid_file=<%= @ne_nrpe_pid_file %> server_port=<%= @ne_nrpe_port %> - server_address=<%= @ne_server_address %> listen_queue_size=<%= @ne_listen_queue_size %> nrpe_user=<%= @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 %> allow_bash_command_substitution=<%= @ne_allow_bash_cmd_subst %>