paulbsd-salt/states/grafana/service/running.sls
Paul f407b96a3a
All checks were successful
continuous-integration/drone/push Build is passing
updated grafana state
2025-03-14 23:43:34 +01:00

26 lines
682 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_config_file = tplroot ~ '.config.file' %}
{%- from tplroot ~ "/map.jinja" import grafana with context %}
include:
- {{ sls_config_file }}
grafana-service-running-service-unmasked:
service.unmasked:
- name: {{ grafana.service.name }}
grafana-service-running-service-running:
service.running:
- name: {{ grafana.service.name }}
- enable: True
{%- if 'config' in grafana and grafana.config %}
- watch:
- file: grafana-config-file-file-managed-config_file
- require:
- sls: {{ sls_config_file }}
{%- endif %}