1
0
Fork 0
mirror of synced 2024-11-26 02:35:35 -05:00

Move the configuration into a separate state

This patch separates the configuration of Grafana client. This allows to
configure the client, restart the minion to read the conf and finally
apply the grafana.client state.
This commit is contained in:
Guillaume Thouvenin 2016-12-02 11:39:10 +01:00
parent 7e07c93f36
commit 57167d8bfd
2 changed files with 13 additions and 6 deletions

View file

@ -1,12 +1,8 @@
{%- from "grafana/map.jinja" import client with context %} {%- from "grafana/map.jinja" import client with context %}
{%- if client.get('enabled', False) %} {%- if client.get('enabled', False) %}
/etc/salt/minion.d/_grafana.conf: include:
file.managed: - grafana.client.service
- source: salt://grafana/files/_grafana.conf
- template: jinja
- user: root
- group: root
{%- for datasource_name, datasource in client.datasource.iteritems() %} {%- for datasource_name, datasource in client.datasource.iteritems() %}

View file

@ -0,0 +1,11 @@
{%- from "grafana/map.jinja" import client with context %}
{%- if client.get('enabled', False) %}
/etc/salt/minion.d/_grafana.conf:
file.managed:
- source: salt://grafana/files/_grafana.conf
- template: jinja
- user: root
- group: root
{%- endif %}