26 lines
950 B
Django/Jinja
26 lines
950 B
Django/Jinja
#jinja2: trim_blocks: True, lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
# https://github.com/grafana/loki/blob/master/docs/clients/promtail/configuration.md
|
|
server:
|
|
{{ promtail_config_server | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
{% if promtail_config_positions != {} %}
|
|
positions:
|
|
{{ promtail_config_positions | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
{% endif %}
|
|
|
|
clients:
|
|
{{ promtail_config_clients | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
scrape_configs:
|
|
{% if promtail_config_include_default_file_sd_config | bool %}
|
|
{{ promtail_config_default_file_sd_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
{% endif %}
|
|
{% if promtail_config_scrape_configs|length %}
|
|
{{ promtail_config_scrape_configs | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
{% endif %}
|
|
|
|
{% if promtail_target_config != {} %}
|
|
target_config:
|
|
{{ promtail_target_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
{% endif %} |