ansible-role-icinga2/templates/groups.conf.j2
2021-01-03 16:10:04 +01:00

15 lines
438 B
Django/Jinja

# {{ ansible_managed }}
{% for name, group in icinga2_host_groups.items() %}
object HostGroup "{{ name }}" {
display_name = "{{ group.display_name|default(name) }}"
assign where {{ group.assign }}
}
{% endfor %}
{% for name, group in icinga2_service_groups.items() %}
object ServiceGroup "{{ name }}" {
display_name = "{{ group.display_name|default(name) }}"
assign where match("{{ group.match }}", service.name)
}
{% endfor %}