trying empty array

This commit is contained in:
Arne Teuke
2017-07-21 12:06:36 +01:00
parent 49551a3d9a
commit e402224ff9
2 changed files with 13 additions and 5 deletions

View File

@@ -194,6 +194,9 @@
# "Send Notification" to be unchecked.
# @param [boolean] ng_use_selinux_tools Whether to enable selinux tools and
# policies. only effective if selinux is enabled.
# @param [array] ng_required_hosts Array of FQDNs for hosts which should be
# allowed/required. every entry in the array creates a new line in the
# configuration file.
###############################################################################
class cd_nagios::params (
@@ -302,7 +305,7 @@ $ng_ack_no_send = '0',
$ng_use_selinux_tools = true,
# httpd
$ng_required_hosts = [''],
) {

View File

@@ -9,7 +9,7 @@
ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<Directory "/usr/lib64/nagios/cgi-bin/">
<% if @ng_require_ssl == true -%>
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
@@ -19,8 +19,10 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
Require local
<% @ng_required_hosts.each do |required_host| -%>
Require host <%= required_host %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
@@ -50,7 +52,10 @@ Alias /nagios "/usr/share/nagios/html"
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
Require local
<% @ng_required_hosts.each do |required_host| -%>
Require host <%= required_host %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic