From 4626821faac754e918836774280fa5c69d10447f Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Mon, 10 Feb 2020 09:02:51 -0600 Subject: Added grafana restart handler. --- prometheus/rpi-client/tasks/main.yaml | 2 +- prometheus/server/handlers/main.yaml | 4 ++++ prometheus/server/tasks/main.yaml | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/prometheus/rpi-client/tasks/main.yaml b/prometheus/rpi-client/tasks/main.yaml index a5cc8e0..db248ec 100644 --- a/prometheus/rpi-client/tasks/main.yaml +++ b/prometheus/rpi-client/tasks/main.yaml @@ -4,7 +4,7 @@ become: yes user: name="prometheus" groups="video" append="yes" -- name: install prometheus rpi exporter +- name: install prometheus rpi-exporter unarchive: src: "https://github.com/lukasmalkmus/rpi_exporter/releases/download/v{{prometheus_client_rpi_exporter_version}}/rpi_exporter-{{prometheus_client_rpi_exporter_version}}.linux-{{prometheus_client_arch}}.tar.gz" remote_src: yes diff --git a/prometheus/server/handlers/main.yaml b/prometheus/server/handlers/main.yaml index 223e1b0..248df86 100644 --- a/prometheus/server/handlers/main.yaml +++ b/prometheus/server/handlers/main.yaml @@ -3,3 +3,7 @@ - name: restart prometheus service systemd: name="prometheus.service" state="restarted" daemon_reload="yes" become: yes + +- name: restart grafana service + systemd: name="grafana-server.service" state="restarted" daemon_reload="yes" + become: yes diff --git a/prometheus/server/tasks/main.yaml b/prometheus/server/tasks/main.yaml index 8235c9b..b6745be 100644 --- a/prometheus/server/tasks/main.yaml +++ b/prometheus/server/tasks/main.yaml @@ -17,6 +17,8 @@ template: src: "{{prometheus_server_conf}}" dest: "/etc/prometheus/prometheus.yml" - notify: restart prometheus service + notify: + - restart prometheus service + - restart grafana service # /etc/grafana/grafana.ini -- cgit v1.2.3