servers/roles/prometheus/tasks/main.yml
Timotej Lazar d347fd7215 Add prometheus role
Configured to include job definitions from /etc/prometheus/conf.d/*.yml.
2025-10-17 21:21:01 +02:00

21 lines
397 B
YAML

- name: Install packages
package:
name:
- prometheus
- name: Create directory for prometheus configs
file:
path: /etc/prometheus/conf.d
state: directory
- name: Configure prometheus
copy:
dest: /etc/prometheus/
src: prometheus.yml
notify: reload prometheus
- name: Enable prometheus service
service:
name: prometheus
enabled: true
state: started