found format options both for hosts and ips

This commit is contained in:
Arne Teuke
2017-07-21 13:51:07 +01:00
parent 442fd08f62
commit 5d12bf4437
2 changed files with 14 additions and 19 deletions

View File

@@ -20,13 +20,11 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
<% @ng_required_hosts.each do |required_host| -%>
Require host <%= required_host %>
<% end end -%>
<% if @ng_required_ips != [] -%>
<% @ng_required_ips.each do |required_ips| -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= required_ips %>
<% end end -%>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
@@ -57,13 +55,11 @@ Alias /nagios "/usr/share/nagios/html"
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
<% @ng_required_hosts.each do |required_host| -%>
Require host <%= required_host %>
<% end end -%>
<% if @ng_required_ips != [] -%>
<% @ng_required_ips.each do |required_ips| -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= required_ips %>
<% end end -%>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd