Files
ansible-docker/roles/prometheus/tasks/main.yml
2023-12-21 01:14:31 +02:00

33 lines
941 B
YAML

---
- name: Prometheus container
include_role:
name: container
vars:
docker_service: prometheus
docker_image: prom/prometheus
reverse_proxy_type: none
docker_command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention={{ prometheus_storage_retention }}"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
docker_mounts:
- name: data
path: /prometheus
- template: prometheus.yml
path: /etc/prometheus/prometheus.yml
- copypath: recording
path: /etc/prometheus/recording
- copypath: alerting
path: /etc/prometheus/alerting
- name: Grafana container for prometheus
include_role:
name: grafana
vars:
docker_networks:
- name: prometheus
when: prometheus_install_grafana