# HG changeset patch # User Luke Hoersten # Date 1581346971 21600 # Node ID 20975062661df5badfb1ceb5704767a770944b60 # Parent dc3fca0131a7a86ce834c4b3ce6c406912298f46 Added grafana restart handler. diff -r dc3fca0131a7 -r 20975062661d prometheus/rpi-client/tasks/main.yaml --- a/prometheus/rpi-client/tasks/main.yaml Mon Feb 10 07:49:58 2020 -0600 +++ b/prometheus/rpi-client/tasks/main.yaml Mon Feb 10 09:02:51 2020 -0600 @@ -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 -r dc3fca0131a7 -r 20975062661d prometheus/server/handlers/main.yaml --- a/prometheus/server/handlers/main.yaml Mon Feb 10 07:49:58 2020 -0600 +++ b/prometheus/server/handlers/main.yaml Mon Feb 10 09:02:51 2020 -0600 @@ -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 -r dc3fca0131a7 -r 20975062661d prometheus/server/tasks/main.yaml --- a/prometheus/server/tasks/main.yaml Mon Feb 10 07:49:58 2020 -0600 +++ b/prometheus/server/tasks/main.yaml Mon Feb 10 09:02:51 2020 -0600 @@ -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