Files
ansible-monitoring/jobs/update_prom.yml
T
Thies Mueller a49ac0c51a commit
2026-06-06 00:03:38 +02:00

35 lines
1.0 KiB
YAML

- hosts: monitoring
tasks:
- name: deploy prometheus config
template:
src: templates/prometheus.yml.j2
dest: /opt/containers/prometheus-grafana/prometheus/prometheus.yml
owner: root
group: root
mode: 0644
- name: deploy prometheus rules
copy:
src: templates/rules.yml
dest: /opt/containers/prometheus-grafana/prometheus/rules.yml
owner: root
group: root
mode: 0644
- name: deploy cert-checker config
copy:
src: templates/cert-checker.yaml
dest: /opt/containers/prometheus-grafana/cert-checker/config.yaml
owner: root
group: root
mode: 0644
- name: reload prometheus container
shell: cd /opt/containers/prometheus-grafana && docker kill prometheus && docker compose up -d
ignore_errors: true
# - name: reload prometheus container (legacy docker)
# shell: cd /opt/containers/prometheus-grafana && docker-compose down && docker-compose up -d
# ignore_errors: true