29 lines
748 B
YAML
29 lines
748 B
YAML
|
---
|
||
|
- name: Create monitoring docker network
|
||
|
become: true
|
||
|
community.docker.docker_network:
|
||
|
name: monitoring
|
||
|
- name: Create grafana volume
|
||
|
become: true
|
||
|
community.docker.docker_volume:
|
||
|
name: grafana
|
||
|
- name: Run grafana
|
||
|
become: true
|
||
|
community.docker.docker_container:
|
||
|
name: grafana
|
||
|
image: grafana/grafana:11.2.2
|
||
|
volumes:
|
||
|
- grafana:/var/lib/grafana
|
||
|
networks:
|
||
|
- name: postgresql
|
||
|
- name: monitoring
|
||
|
- name: haproxy
|
||
|
env:
|
||
|
GF_DATABASE_TYPE: postgres
|
||
|
GF_DATABASE_HOST: postgresql:5432
|
||
|
GF_DATABASE_NAME: grafana
|
||
|
GF_DATABASE_USER: grafana
|
||
|
GF_DATABASE_PASSWORD: "{{ grafana_database_password }}"
|
||
|
GF_DATABASE_SSL_MODE: disable
|
||
|
restart_policy: unless-stopped
|