# Hostgroup definitions
#
# Autogenerated by Chef.

define hostgroup {
  hostgroup_name all
  alias all
  members *
}

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

<% end -%>

<% if node['nagios']['multi_environment_monitoring'] -%>
<% @environments.each do |e| -%>
define hostgroup {
  hostgroup_name <%= e %>
  alias <%= e %>
}
<% end -%>
<% end -%>

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

<% @search_hostgroups.each do |hostgroup| -%>
define hostgroup {
  hostgroup_name <%= hostgroup %>
  alias <%= hostgroup %>
<% if @search_nodes[hostgroup].length > 0 -%>
  members        <%= @search_nodes[hostgroup] %>
<% else -%>
  members        empty
<% end -%>
}
<% end -%>
# Hostgroup definitions
#
# Autogenerated by Chef.

define hostgroup {
  hostgroup_name all
  alias all
  members *
}

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

<% end -%>

<% if node['nagios']['multi_environment_monitoring'] -%>
<% @environments.each do |e| -%>
define hostgroup {
  hostgroup_name <%= e %>
  alias <%= e %>
}
<% end -%>
<% end -%>

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

<% @search_hostgroups.each do |hostgroup| -%>
define hostgroup {
  hostgroup_name <%= hostgroup %>
  alias <%= hostgroup %>
<% if @search_nodes[hostgroup].length > 0 -%>
  members        <%= @search_nodes[hostgroup] %>
<% else -%>
  members        empty
<% end -%>
}

<% end -%>
Add spaces between host group defs
Add spaces between host group defs
