31 lines
917 B
YAML
31 lines
917 B
YAML
|
# vim:ft=ansible:
|
||
|
- name: ensure prometheus dirs
|
||
|
ansible.builtin.file:
|
||
|
state: directory
|
||
|
owner: 5476
|
||
|
group: 5476
|
||
|
mode: "0750"
|
||
|
path: "{{ item }}"
|
||
|
with_items:
|
||
|
- /data/prometheus/config
|
||
|
- /data/prometheus/data
|
||
|
tags: [ docker, prometheus, monitoring ]
|
||
|
- name: docker deploy prometheus
|
||
|
# NOTE: If you're rebuilding this, you *need* to sync the data over as this
|
||
|
# container will try to explode if you run it with empty volumes. Copy over
|
||
|
# prometheus.yml into the config volume first or steal it from an empty fresh
|
||
|
# container instance
|
||
|
docker_container:
|
||
|
name: prometheus
|
||
|
image: prom/prometheus:latest
|
||
|
user: 5476:5476
|
||
|
env:
|
||
|
TZ: "America/Chicago"
|
||
|
networks:
|
||
|
- name: web
|
||
|
aliases: [ "prometheus" ]
|
||
|
volumes:
|
||
|
- /data/prometheus/config:/etc/prometheus
|
||
|
- /data/prometheus/data:/prometheus
|
||
|
tags: [ docker, prometheus, monitoring ]
|