uncommitted grafana code

This commit is contained in:
2020-06-12 16:32:02 -05:00
parent 91d2fcbf27
commit 277a1bc569
4 changed files with 1167 additions and 133 deletions

View File

@ -44,6 +44,39 @@
mode: 0640
notify: restart grafana
- name: provision datasources
copy:
dest: "{{ grafana_provisioning_path }}/datasources/datasource.yaml"
content: "{{ grafana_datasources | to_nice_yaml }}"
owner: root
group: "{{ grafana_group }}"
mode: 0640
- name: create dashboard directory
file:
path: /var/lib/grafana/dashboards
state: directory
owner: "{{ grafana_user }}"
group: "{{ grafana_group }}"
mode: 0755
- name: provision dashboards
copy:
dest: "{{ grafana_provisioning_path }}/dashboards/dashboards.yaml"
content: "{{ grafana_dashboards | to_nice_yaml }}"
owner: root
group: "{{ grafana_group }}"
mode: 0640
- name: upload user dashboards
copy:
src: "files/grafana/dashboards/{{ item }}"
dest: "/var/lib/grafana/dashboards/{{ item | basename }}"
owner: "{{ grafana_user }}"
group: "{{ grafana_group }}"
mode: 0644
loop: "{{ grafana_dashboard_files | default([]) }}"
- name: manage service
service:
name: "{{ grafana_service_name }}"