31 lines
861 B
YAML
31 lines
861 B
YAML
# vim:ft=ansible:
|
|
- name: ensure grafana dirs
|
|
ansible.builtin.file:
|
|
state: directory
|
|
owner: 472
|
|
group: 472
|
|
mode: "0750"
|
|
path: "{{ item }}"
|
|
with_items:
|
|
- /data/grafana/storage
|
|
- /data/grafana/logs
|
|
tags: [ docker, grafana, monitoring ]
|
|
- name: docker deploy grafana
|
|
docker_container:
|
|
name: grafana
|
|
image: grafana/grafana-oss:main
|
|
env:
|
|
TZ: "America/Chicago"
|
|
# This enables logging to STDOUT for log aggregators to more easily hook it
|
|
GF_LOG_MODE: "console file"
|
|
GF_SERVER_DOMAIN: "grafana.desu.ltd"
|
|
GF_SERVER_PROTOCOL: "http"
|
|
GF_SERVER_ROOT_URL: "https://grafana.desu.ltd"
|
|
networks:
|
|
- name: web
|
|
aliases: [ "grafana" ]
|
|
volumes:
|
|
- /data/grafana/storage:/var/lib/grafana
|
|
- /data/grafana/logs:/var/log/grafana
|
|
tags: [ docker, grafana, monitoring ]
|