From 85e4fc9056a5a48f06d6012ae2deaa31a862d1d9 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Wed, 31 Aug 2022 16:20:23 -0500 Subject: [PATCH] grafana: Move my configuration out of the defaults --- group_vars/stats_servers/main.yaml | 25 +++++++++++++++++-------- roles/grafana/defaults/main.yaml | 27 +++------------------------ 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/group_vars/stats_servers/main.yaml b/group_vars/stats_servers/main.yaml index a13959d..ef736ad 100644 --- a/group_vars/stats_servers/main.yaml +++ b/group_vars/stats_servers/main.yaml @@ -5,7 +5,7 @@ grafana_package_state: present grafana_service_name: grafana-server.service grafana_service_state: started -grafana_service_enabled: yes +grafana_service_enabled: true grafana_etc_path: /etc/grafana grafana_config_path: "{{ grafana_etc_path }}/grafana.ini" @@ -23,20 +23,29 @@ grafana_config: http_addr: localhost http_port: "{{ grafana_port }}" -grafana_ssl_enabled: yes +grafana_ssl_enabled: true grafana_ssl_certificate: "/etc/letsencrypt/live/{{ grafana_domain }}/fullchain.pem" grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey.pem" -#grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" +# grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" grafana_datasources: apiVersion: 1 - datasources: + deleteDatasources: - name: influxdb - type: influxdb + orgId: 1 + datasources: + - name: Prometheus + type: prometheus access: proxy - url: http://localhost:8086 - database: telegraf - isDefault: yes + orgId: 1 + url: http://localhost:9090 + isDefault: true + version: 1 + - name: Thanos + type: prometheus + access: proxy + orgId: 1 + url: http://localhost:10913 version: 1 grafana_dashboards: diff --git a/roles/grafana/defaults/main.yaml b/roles/grafana/defaults/main.yaml index 4145e6b..4da84af 100644 --- a/roles/grafana/defaults/main.yaml +++ b/roles/grafana/defaults/main.yaml @@ -29,31 +29,10 @@ grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey # grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" grafana_datasources: - apiVersion: 1 - datasources: - - name: influxdb - type: influxdb - access: proxy - url: http://localhost:8086 - database: telegraf - isDefault: true - version: 1 + {} grafana_dashboards: - apiVersion: 1 - providers: - - name: ansible - folder: Built-in - type: file - options: - path: /var/lib/grafana/dashboards + {} grafana_dashboard_files: - - connectivity.json - - home-networking.json - - iptables.json - - nginx.json - - processes.json - - switching.json - - system.json - - ups.json + []