mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
pin grafana version in ansible and add to consul
This commit is contained in:
parent
c77d49178b
commit
a6d3fff2ba
2 changed files with 19 additions and 1 deletions
|
@ -4,12 +4,21 @@
|
|||
src: /srv/newsblur/docker/grafana/grafana.ini.j2
|
||||
dest: /srv/newsblur/docker/grafana/grafana.ini
|
||||
|
||||
- name: Register grafana in consul
|
||||
tags: consul
|
||||
become: yes
|
||||
template:
|
||||
src: /srv/newsblur/ansible/roles/grafana/templates/consul_service.json
|
||||
dest: /etc/consul.d/grafana.json
|
||||
notify:
|
||||
- reload consul
|
||||
|
||||
- name: Start grafana container
|
||||
become: yes
|
||||
docker_container:
|
||||
pull: true
|
||||
name: grafana
|
||||
image: grafana/grafana
|
||||
image: grafana/grafana:7.5.7
|
||||
restart_policy: unless-stopped
|
||||
user: root
|
||||
networks_cli_compatible: yes
|
||||
|
|
9
ansible/roles/grafana/templates/consul_service.json
Normal file
9
ansible/roles/grafana/templates/consul_service.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"service": {
|
||||
"name": "grafana",
|
||||
"tags": [
|
||||
"db"
|
||||
],
|
||||
"port": 3000
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue