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:
parent
5bbb9f23e0
commit
eed48db172
1 changed files with 8 additions and 3 deletions
|
@ -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 %}
|
||||||
|
|
Loading…
Reference in a new issue