32 lines
874 B
Django/Jinja
32 lines
874 B
Django/Jinja
###############
|
|
# All Servers and associated devices
|
|
###############
|
|
## {{ env }}
|
|
|
|
{% for key, value in groups.iteritems() %}
|
|
{% if groups[key] != [] %}
|
|
define hostgroup{
|
|
hostgroup_name {{ key }}
|
|
alias {{ key }}
|
|
members {% for host in groups[key] %}{{host}}, {% endfor %}
|
|
|
|
}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
## Services with minimal monitoring
|
|
define hostgroup{
|
|
hostgroup_name mincheckgrp
|
|
alias mincheckgrp
|
|
members {% for host in groups['all'] %}{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}{{host}}, {% endif %}{% endfor %}
|
|
|
|
}
|
|
|
|
##
|
|
## Management hardware
|
|
define hostgroup {
|
|
hostgroup_name phx2_mgmt_systems
|
|
alias phx2_mgmt_systems
|
|
members {% for host in vars['phx2_management_hosts'] %}{{host}}{% if not loop.last %},{% endif %} {% endfor %}
|
|
|
|
}
|