feat: initial commit
This commit is contained in:
parent
846bc41aa1
commit
4f744469c0
17 changed files with 324 additions and 0 deletions
48
tasks/grafana.yaml
Normal file
48
tasks/grafana.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
|
||||
# create directories
|
||||
- name: "create grafana data directory"
|
||||
ansible.builtin.file:
|
||||
path: "/mnt/grafana"
|
||||
state: "directory"
|
||||
mode: "0775"
|
||||
|
||||
# run grafana
|
||||
- name: "run grafana"
|
||||
community.docker.docker_container:
|
||||
|
||||
# docker defaults
|
||||
auto_remove: "no"
|
||||
container_default_behavior: "no_defaults"
|
||||
detach: "yes"
|
||||
init: "no"
|
||||
interactive: "no"
|
||||
log_driver: "json-file"
|
||||
log_options:
|
||||
max-size: "5m"
|
||||
max-file: "3"
|
||||
memory: "0"
|
||||
paused: "no"
|
||||
privileged: "no"
|
||||
pull: "always"
|
||||
read_only: "no"
|
||||
state: "started"
|
||||
tty: "no"
|
||||
|
||||
# run grafana
|
||||
name: "grafana"
|
||||
image: "docker.io/grafana/grafana-oss:12.2.1"
|
||||
image_name_mismatch: "recreate"
|
||||
restart_policy: "unless-stopped"
|
||||
network_mode: "host"
|
||||
|
||||
volumes:
|
||||
- "/mnt/grafana:/var/lib/grafana"
|
||||
|
||||
env:
|
||||
|
||||
# grafana
|
||||
GF_SECURITY_ADMIN_PASSWORD: "{{ grafana_admin_password }}"
|
||||
|
||||
# global
|
||||
TZ: "{{ timezone }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue