1
0
Fork 0
mirror of synced 2024-11-22 08:55:35 -05:00

Use the right parameters to configure datasource

This patch uses the user and password instead of setting basic auth that
is used as credentials when connecting to the Grafana server. In our
case we are using the grafana configuration on the minion to connect to
Grafana. This patch also adds an option to set the datasource as the
default one.
This commit is contained in:
Guillaume Thouvenin 2016-11-02 15:50:17 +01:00
parent 5bbb9f23e0
commit eed48db172

View file

@ -19,9 +19,14 @@ grafana_client_datasource_{{ datasource_name }}:
- access: proxy - access: proxy
{%- endif %} {%- endif %}
{%- if datasource.user is defined %} {%- if datasource.user is defined %}
- basic_auth: true - user: {{ datasource.user }}
- basic_auth_user: {{ datasource.user }} - password: {{ datasource.password }}
- basic_auth_password: {{ datasource.password }} {%- endif %}
{%- if datasource.get('is_default', false) %}
- is_default: {{ datasource.is_default }}
{%- endif %}
{%- if datasource.database is defined %}
- database: {{ datasource.database }}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}