###############
# All Servers and associated devices
###############
## {{ env }}
{% for key, value in groups.iteritems()|sort %}
{% if groups[key] != [] and key not in ['newcloud-compute', 'newcloud-control', 'newcloud-undercloud', 'newcloud', 'nixnagios', 'rhel8beta'] %}
define hostgroup{
       hostgroup_name {{ key }}
       alias          {{ key }}
       members        {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %} 

}
{% endif %}
{% endfor %}

## Services with minimal monitoring
define hostgroup{
       hostgroup_name mincheckgrp
       alias          mincheckgrp
       members        {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %} 

}

define hostgroup{
       hostgroup_name routers
       alias          routers
       members        phx2-gw, ibiblio-gw, cloud-gw, coloamer-gw, dedicated-gw, host1plus-gw, internetx-gw, osuosl-gw, rdu-gw, rdu-cc-gw
}


##
## Management hardware
define hostgroup {
        hostgroup_name  phx2_mgmt_systems
        alias           phx2_mgmt_systems
        members         {% for host in vars['phx2_management_hosts']|sort %}{{host}}{% if not loop.last %},{% endif %} {% endfor %} 

}
