Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit b0883d5

Browse files
authored
Merge pull request #2 from weakcamel/add_extra_loki_config
add query_range, query_scheduler and custom configs
2 parents 0e57631 + fd4fe47 commit b0883d5

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is a fork of a simple and extremely useful diogenxs.loki role.
88
Requirements
99
------------
1010

11-
- Ansible >= 2.9
11+
- Ansible >= 3.0
1212

1313
Example Playbook
1414
------------

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ loki_table_manager_config:
7676
retention_deletes_enabled: false
7777
retention_period: 0s
7878
loki_ruler_config: {}
79+
loki_query_scheduler: {}
80+
loki_query_range: {}
81+
82+
# catch-all config option to be added "verbatim" to loki.yml
83+
loki_custom_config: {}
7984

8085
promtail_client_config:
8186
- url: "http://{{ loki_listen_address }}:{{ loki_listen_port }}/loki/api/v1/push"

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ galaxy_info:
55
description: Deploy and configure Loki and Promtail.
66
issue_tracker_url: https://github.com/weakcamel/ansible-role-loki/issues
77
license: WTFPL
8-
min_ansible_version: "2.9"
8+
min_ansible_version: "3.0"
99
platforms:
1010
- name: Ubuntu
1111
versions:

templates/loki.yml.j2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ runtime_config:
6161
ruler:
6262
{{ loki_ruler_config | to_nice_yaml(indent=2) | indent(2, False) }}
6363
{% endif %}
64+
{% if loki_query_scheduler %}
65+
query_scheduler:
66+
{{ loki_query_scheduler | to_nice_yaml(indent=2) | indent(2, False) }}
67+
{% endif %}
68+
{% if loki_query_range %}
69+
query_range:
70+
{{ loki_query_range | to_nice_yaml(indent=2) | indent(2, False) }}
71+
{% endif %}
72+
{% if loki_custom_config %}
73+
{{ loki_custom_config | to_nice_yaml(indent=2) }}
74+
{% endif %}

0 commit comments

Comments
 (0)