Manage minion.d using support metadata
Change-Id: I37f1c26f8125d98bcbe8d5a105dd5abac9224b36
This commit is contained in:
parent
4931237ebc
commit
67a022be4f
4 changed files with 16 additions and 27 deletions
|
@ -1,9 +1,6 @@
|
|||
{%- from "grafana/map.jinja" import client with context %}
|
||||
{%- if client.get('enabled', False) %}
|
||||
|
||||
include:
|
||||
- grafana.client.service
|
||||
|
||||
{%- for datasource_name, datasource in client.datasource.iteritems() %}
|
||||
|
||||
grafana_client_datasource_{{ datasource_name }}:
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{%- 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 %}
|
|
@ -1,13 +0,0 @@
|
|||
{%- from "grafana/map.jinja" import client with context %}
|
||||
|
||||
grafana_version: {{ client.server.get('version', 3) }}
|
||||
|
||||
grafana:
|
||||
grafana_timeout: 3
|
||||
{%- if client.server.token is defined %}
|
||||
grafana_token: {{ client.server.token }}
|
||||
{%- else %}
|
||||
grafana_user: {{ client.server.user }}
|
||||
grafana_password: {{ client.server.password }}
|
||||
{%- endif %}
|
||||
grafana_url: '{{ client.server.get('protocol', 'http') }}://{{ client.server.host }}:{{ client.server.get('port', 80) }}'
|
|
@ -14,3 +14,19 @@ grain:
|
|||
{{ service_grains|yaml(False)|indent(4) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
minion:
|
||||
{%- if pillar.grafana.client is defined %}
|
||||
grafana:
|
||||
{%- from "grafana/map.jinja" import client with context %}
|
||||
grafana_version: {{ client.server.get('version', 3) }}
|
||||
grafana:
|
||||
grafana_timeout: 3
|
||||
{%- if client.server.token is defined %}
|
||||
grafana_token: {{ client.server.token }}
|
||||
{%- else %}
|
||||
grafana_user: {{ client.server.user }}
|
||||
grafana_password: {{ client.server.password }}
|
||||
{%- endif %}
|
||||
grafana_url: '{{ client.server.get('protocol', 'http') }}://{{ client.server.host }}:{{ client.server.get('port', 80) }}'
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in a new issue