homelab-ansible/playbooks/util/prometheus-config.yml
2025-07-12 23:41:13 -04:00

16 lines
467 B
YAML

---
- name: Regenerate prometheus config and restart container
hosts: observability_hub
become: true
tasks:
- name: Generate Prometheus config from template
ansible.builtin.template:
src: templates/prometheus.yml.j2
dest: "{{ container_data_base_path }}/prometheus/prometheus.yml"
- name: Restart prometheus container
community.docker.docker_container:
name: prometheus
state: started
restart: true