diff --git a/README.md b/README.md index 5b522c7..ba7f4c6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is a fork of a simple and extremely useful diogenxs.loki role. Requirements ------------ -- Ansible >= 2.9 +- Ansible >= 3.0 Example Playbook ------------ diff --git a/defaults/main.yml b/defaults/main.yml index dcde76c..dd602ee 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -76,6 +76,11 @@ loki_table_manager_config: retention_deletes_enabled: false retention_period: 0s loki_ruler_config: {} +loki_query_scheduler: {} +loki_query_range: {} + +# catch-all config option to be added "verbatim" to loki.yml +loki_custom_config: {} promtail_client_config: - url: "http://{{ loki_listen_address }}:{{ loki_listen_port }}/loki/api/v1/push" diff --git a/meta/main.yml b/meta/main.yml index 2174161..32fb399 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Deploy and configure Loki and Promtail. issue_tracker_url: https://github.com/weakcamel/ansible-role-loki/issues license: WTFPL - min_ansible_version: "2.9" + min_ansible_version: "3.0" platforms: - name: Ubuntu versions: diff --git a/templates/loki.yml.j2 b/templates/loki.yml.j2 index 83ee8ed..5a077ac 100644 --- a/templates/loki.yml.j2 +++ b/templates/loki.yml.j2 @@ -61,3 +61,14 @@ runtime_config: ruler: {{ loki_ruler_config | to_nice_yaml(indent=2) | indent(2, False) }} {% endif %} +{% if loki_query_scheduler %} +query_scheduler: + {{ loki_query_scheduler | to_nice_yaml(indent=2) | indent(2, False) }} +{% endif %} +{% if loki_query_range %} +query_range: + {{ loki_query_range | to_nice_yaml(indent=2) | indent(2, False) }} +{% endif %} +{% if loki_custom_config %} +{{ loki_custom_config | to_nice_yaml(indent=2) }} +{% endif %}