# Hostgroup definitions
# Automatically generated by Chef

define hostgroup {
  hostgroup_name all
  alias all
  members *
}

<% @roles.each do |r| -%>
define hostgroup {
  hostgroup_name <%= r %>
  alias <%= r %>
}
<% end -%>

<% @environments.each do |e| -%>
define hostgroup {
  hostgroup_name <%= e %>
  alias <%= e %>
}
<% end -%>

<% if node['nagios']['multi_os_monitoring'] == true -%>
<% @os.each do |o| -%>
define hostgroup {
	hostgroup_name <%= o %>
	alias <%= o %>
}
<% end -%>
<% end -%>

# Hostgroup definitions
# Automatically generated by Chef

define hostgroup {
  hostgroup_name all
  alias all
  members *
}

<% @roles.each do |r| -%>
define hostgroup {
  hostgroup_name <%= r %>
  alias <%= r %>
}
<% end -%>

<% @environments.each do |e| -%>
define hostgroup {
  hostgroup_name <%= e %>
  alias <%= e %>
}
<% end -%>

<% if os.any? -%>
<% @os.each do |o| -%>
define hostgroup {
	hostgroup_name <%= o %>
	alias <%= o %>
}
<% end -%>
<% end -%>

Switch to any? to check if there are values in the OS array
Switch to any? to check if there are values in the OS array


Former-commit-id: d1955dead4c7cf78c6fdf3bba5b9ce8e57efc578 [formerly 33930c3de64bd69aef953eb98849763ff93714a9] [formerly b0af79e2fd2c9c988d12b5dd315216ed45a3ec13 [formerly cff9407d67788dd0522d90b61ab4fefd91e322f1]]
Former-commit-id: c5e775f17e4ba0c9830c93e4ff7bcb10f21fd135 [formerly b0336d5e6d8af74adb1197fbd2ad6162bb14469c]
Former-commit-id: 2eb22bf50e642eb37f6fc4ac77a8413174a61ee3