Restarting grafana on build/deploy.

This commit is contained in:
Samuel Clay 2021-10-19 12:53:11 -04:00
parent ce34d598ca
commit 5915ee1a3e
3 changed files with 14 additions and 1 deletions

View file

@ -16,7 +16,7 @@
image: prometheuscommunity/elasticsearch-exporter:latest
pull: yes
state: started
command: '--es.uri=http://db_elasticsearch:9200'
command: '--es.uri=http://elasticsearch:9200'
hostname: "{{ inventory_hostname }}"
restart_policy: unless-stopped
container_default_behavior: no_defaults

View file

@ -0,0 +1,5 @@
---
- name: restart grafana
become: yes
command: docker restart grafana
listen: restart grafana

View file

@ -3,6 +3,7 @@
template:
src: /srv/newsblur/docker/grafana/grafana.ini.j2
dest: /srv/newsblur/docker/grafana/grafana.ini
notify: restart grafana
- name: Register grafana in consul
tags: consul
@ -33,3 +34,10 @@
- /srv/newsblur/docker/volumes/grafana_data:/var/lib/grafana
- /srv/newsblur/docker/grafana/datasources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
- /srv/newsblur/docker/grafana/dashboards/:/etc/grafana/provisioning/dashboards/
- name: Restart grafana
debug:
msg: Restarting grafana
changed_when: yes
notify:
- restart grafana