add loki role
This commit is contained in:
19
roles/loki/templates/loki.service.j2
Normal file
19
roles/loki/templates/loki.service.j2
Normal file
@ -0,0 +1,19 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Loki
|
||||
After=network-online.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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
30
roles/loki/templates/loki.yaml.j2
Normal file
30
roles/loki/templates/loki.yaml.j2
Normal file
@ -0,0 +1,30 @@
|
||||
{{ 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