ansible/roles/thanos/templates/thanos-compact.service.j2

30 lines
718 B
Plaintext
Raw Permalink Normal View History

2022-08-30 12:51:26 +00:00
{{ ansible_managed | comment }}
[Unit]
Description=Thanos Store Compactor
Wants=network-online.target
After=network-online.target
After=prometheus.service
[Service]
Type=simple
User={{ thanos_user }}
Group={{ thanos_group }}
SyslogIdentifier=thanos-compact
ExecStart={{ thanos_bin_path }}/thanos compact \
{% if thanos_compact_data_dir %}
--data-dir={{ thanos_compact_data_dir }} \
{% endif %}
{% if thanos_compact_objstore_config_file %}
--objstore.config-file={{ thanos_compact_objstore_config_file }} \
{% endif %}
{% if thanos_compact_http_address %}
--http-address={{ thanos_compact_http_address }} \
{% endif %}
{% if thanos_compact_wait %}
--wait \
{% endif %}
[Install]
WantedBy=multi-user.target