role service-grafana: add grafana datasources for prometheus and yanic

This commit is contained in:
Julian Labus 2018-09-14 13:21:07 +02:00
parent 7a7eaae84a
commit 99325672d2
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A

View file

@ -47,3 +47,24 @@
name: grafana-server
enabled: yes
state: started
- name: add yanic datasource
when: yanic_present is defined
grafana_datasource:
name: "yanic"
grafana_url: "http://localhost:3000"
grafana_user: "admin"
grafana_password: "{{ lookup('passwordstore', 'grafana/admin') }}"
ds_type: "influxdb"
url: "http://localhost:8086"
database: "yanic"
- name: add prometheus datasource
when: prometheus_present is defined
grafana_datasource:
name: "prometheus"
grafana_url: "http://localhost:3000"
grafana_user: "admin"
grafana_password: "{{ lookup('passwordstore', 'grafana/admin') }}"
ds_type: "prometheus"
url: "http://localhost:9090"