{% 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