{% if custom_server_config is defined %} {{ custom_server_config }} {% else %} server: http_listen_port: {{ promtail_http_port }} grpc_listen_port: 0 {% endif %} positions: filename: {{ promtail_positions_path }} clients: - url: "http://{{ promtail_loki_server }}:{{ promtail_loki_port }}/loki/api/v1/push" scrape_configs: {% if promtail_add_var_logs %} - job_name: system static_configs: - targets: - localhost labels: job: varlogs __path__: /var/log/*log host: {{ ansible_hostname }} {% endif %} {% if custom_scrape_configs is defined %} {{ custom_scrape_configs }} {% endif %}