feat: add option to use custom datasource template files
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2021-09-04 23:32:58 +02:00
parent c660711a85
commit 8474cf114f
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 15 additions and 0 deletions

View File

@ -55,3 +55,6 @@ grafana_log_mode:
grafana_log_level: info
grafana_log_providers: []
grafana_datasource_files:
- grafana/datasources/*.yml.j2

View File

@ -43,6 +43,18 @@
mode: 0640
notify: __grafana_restart
- name: Copy custom grafana datasource files
template:
src: "{{ item }}"
dest: /etc/grafana/provisioning/datasources/{{ item | basename | splitext | first }}
owner: root
group: grafana
mode: 0640
with_fileglob: "{{ grafana_template_files }}"
loop_control:
label: "{{ item | basename | splitext | first }}"
notify: __grafana_restart
- name: Ensure Grafana is up and running
service:
name: grafana-server