loki: flesh out role
This commit is contained in:
55
roles/loki/templates/config.yaml.j2
Normal file
55
roles/loki/templates/config.yaml.j2
Normal file
@ -0,0 +1,55 @@
|
||||
{{ ansible_managed | comment }}
|
||||
---
|
||||
{% if loki_auth_enabled is defined %}
|
||||
auth_enabled: {{ loki_auth_enabled | bool | lower }}
|
||||
{% endif %}
|
||||
|
||||
{% if loki_server is defined %}
|
||||
server:
|
||||
{{ loki_server | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_common is defined %}
|
||||
common:
|
||||
{{ loki_common | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_query_range is defined %}
|
||||
query_range:
|
||||
{{ loki_query_range | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_storage_config is defined %}
|
||||
storage_config:
|
||||
{{ loki_storage_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_schema_config is defined %}
|
||||
schema_config:
|
||||
{{ loki_schema_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_ruler is defined %}
|
||||
ruler:
|
||||
{{ loki_ruler | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_query_scheduler is defined %}
|
||||
query_scheduler:
|
||||
{{ loki_query_scheduler | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_querier is defined %}
|
||||
querier:
|
||||
{{ loki_querier | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_compactor is defined %}
|
||||
compactor:
|
||||
{{ loki_compactor | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_limits_config is defined %}
|
||||
limits_config:
|
||||
{{ loki_limits_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
@ -1,19 +1,19 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Loki
|
||||
After=network-online.target
|
||||
Description=Loki service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ loki_user }}
|
||||
Group={{ loki_group }}
|
||||
ExecStart={{ loki_bin_path }}/loki \
|
||||
-config.file {{ loki_config_path }}
|
||||
WorkingDirectory={{ loki_var_path }}
|
||||
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
WorkingDirectory={{ loki_var_path }}
|
||||
TimeoutSec = 120
|
||||
Restart = on-failure
|
||||
RestartSec = 2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
@ -1,30 +0,0 @@
|
||||
{{ ansible_managed | comment }}
|
||||
---
|
||||
{% if loki_auth_enabled is defined %}
|
||||
auth_enabled: {{ loki_auth_enabled | bool | lower }}
|
||||
{% endif %}
|
||||
|
||||
{% if loki_server is defined %}
|
||||
server:
|
||||
{{ loki_server | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_ingester is defined %}
|
||||
ingester:
|
||||
{{ loki_ingester | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_schema_config is defined %}
|
||||
schema_config:
|
||||
{{ loki_schema_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_storage_config is defined %}
|
||||
storage_config:
|
||||
{{ loki_storage_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
||||
|
||||
{% if loki_limits_config is defined %}
|
||||
limits_config:
|
||||
{{ loki_limits_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif -%}
|
Reference in New Issue
Block a user