{{ ansible_managed | comment }}

global:
  resolve_timeout: {{ alertmanager.alertmanager_resolve_timeout | quote}}
{% for key, value in alertmanager.alertmanager_smtp.items() %}
  smtp_{{ key }}: {{ value | quote }}
{% endfor %}
templates:
- '{{ _bind_mount_alertmanager_config_directory }}/templates/*.tmpl'
{% if alertmanager.alertmanager_receivers | length %}
receivers:
{{ alertmanager.alertmanager_receivers | to_nice_yaml(indent=2) }}
{% endif %}
{% if alertmanager.alertmanager_inhibit_rules | length %}
inhibit_rules:
{{ alertmanager.alertmanager_inhibit_rules | to_nice_yaml(indent=2) }}
{% endif %}
route:
  {{ alertmanager.alertmanager_route | to_nice_yaml(indent=2) | indent(2, False) }}