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

Merge pull request #5 from thouveng/fix-grafana-state

Fix grafana state
This commit is contained in:
thouveng 2016-11-02 16:51:01 +01:00 committed by GitHub
commit b73ac79c42
2 changed files with 9 additions and 4 deletions

View file

@ -135,7 +135,7 @@ def present(name,
timeout=profile.get('grafana_timeout', 3),
)
else:
requests.put(
requests.post(
'{0}/api/datasources'.format(profile['grafana_url']),
data,
auth=_get_auth(profile),

View file

@ -19,9 +19,14 @@ grafana_client_datasource_{{ datasource_name }}:
- access: proxy
{%- endif %}
{%- if datasource.user is defined %}
- basic_auth: true
- basic_auth_user: {{ datasource.user }}
- basic_auth_password: {{ datasource.password }}
- user: {{ datasource.user }}
- 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 %}
{%- endfor %}