1
0
Fork 0
mirror of synced 2024-11-22 17:05:34 -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), timeout=profile.get('grafana_timeout', 3),
) )
else: else:
requests.put( requests.post(
'{0}/api/datasources'.format(profile['grafana_url']), '{0}/api/datasources'.format(profile['grafana_url']),
data, data,
auth=_get_auth(profile), auth=_get_auth(profile),

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 %}