ansible-role-nagios/templates/contacts.cfg.j2

26 lines
577 B
Text
Raw Permalink Normal View History

2022-10-11 09:19:02 +02:00
# File managed by Ansible
# CONTACTS DEFINITIONS
{% if contacts %}{% for contact in contacts %}
define contact{
{% for key, value in contact.items() %}
{{ key }} {{ value }}
{% endfor %}
}
{% endfor %}{% endif %}
# CONTACTGROUPS DEFINITIONS
{% if contactgroups %}{% for contactgroup in contactgroups %}
define contactgroup{
{% for key, value in contactgroup.items() %}
{% if key != "members" %}
{{ key }} {{ value }}
{% endif %}
{% if 'members' in contactgroup %}
members {{ contactgroup.members | join(',') }}
{% endif %}
{% endfor %}
}
{% endfor %}{% endif %}