homelab-ansible/playbooks/util/prometheus-config.yml

16 lines
449 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: "/home/docker/prometheus/prometheus.yml"
- name: Restart prometheus container
community.docker.docker_container:
name: prometheus
state: started
restart: true