31 lines
828 B
Django/Jinja
31 lines
828 B
Django/Jinja
# {{ 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 %}
|