1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 {%- set grafana_server = salt['pillar.get']('grafana', {}) %}
6 {%- set grafana_dashboards_orig_dir = '/srv/salt/dashboards' %}
7 {%- set grafana_dashboards_dest_dir = '/var/lib/grafana/dashboards' %}
9 {%- if grafana_server %}
10 extra_grafana_dashboard_directory:
12 - name: {{ grafana_dashboards_dest_dir }}
14 - pkg: grafana-package-install-pkg-installed
16 extra_grafana_dashboard_default_yaml:
18 - name: /etc/grafana/provisioning/dashboards/default.yaml
23 folder: 'Arvados Cluster'
26 path: {{ grafana_dashboards_dest_dir }}
28 - pkg: grafana-package-install-pkg-installed
29 - file: extra_grafana_dashboard_directory
31 extra_grafana_dashboard_files:
33 - name: {{ grafana_dashboards_dest_dir }}
34 - source: {{ grafana_dashboards_orig_dir }}
38 - file: extra_grafana_dashboard_default_yaml
40 extra_grafana_dashboards_service_restart:
42 - name: systemctl restart grafana-server
44 - file: extra_grafana_dashboard_default_yaml
46 - file: extra_grafana_dashboard_default_yaml
47 - file: extra_grafana_dashboard_files