salt-states/containers/loki.sls

33 lines
671 B
Plaintext
Raw Permalink Normal View History

2023-06-27 07:16:37 +00:00
{% from 'lib.sls' import container_deploy with context %}
Create loki data directory:
file.directory:
- name: /srv/loki
- user: 10001
- group: root
- mode: "0755"
Create loki config directory:
file.directory:
- name: /etc/loki
- user: 10001
- group: root
- mode: "0755"
Create loki configuration file:
file.managed:
- name: /etc/loki/config.yaml
- source: salt://containers/files/loki-config.yaml
- user: root
- group: root
- mode: "0644"
{{ container_deploy('loki') }}
Start loki service:
service.running:
- name: loki
- enable: True
- onchanges:
- file: Create loki configuration file