ansible-role-icinga2/templates/timeperiods.conf.j2

32 lines
828 B
Text
Raw Normal View History

2021-01-03 15:10:04 +00:00
# {{ ansible_managed }}
{% for time_name, time in icinga2_timeperiods.items() %}
object TimePeriod "{{ time_name }}" {
{% if time.display_name is defined %}
display_name = "{{ time.display_name }}"
{% endif %}
prefer_includes = {% if time.prefer_includes is sameas false %}false{% else %}true
{% endif %}
ranges = {
{% if time.ranges is defined %}
{% for timeperiod, range in time.ranges.items() %}
"{{ timeperiod }}" = "{{ range }}"
{% endfor %}
{% endif %}
}
{% if time.includes is defined %}
includes = {
{% for timeperiod, range in time.includes.items() %}
"{{ timeperiod }}" = "{{ range }}"
{% endfor %}
}
{% endif %}
{% if time.excludes is defined %}
excludes = {
{% for timeperiod, range in time.excludes.items() %}
"{{ timeperiod }}" = "{{ range }}"
{% endfor %}
}
{% endif %}
}
{% endfor %}