Initial Ansible automation for homelab infrastructure

This commit is contained in:
Adyrem
2026-05-13 16:17:04 +02:00
commit c23274c7ab
24 changed files with 583 additions and 0 deletions
@@ -0,0 +1,29 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: ['localhost:9093']
rule_files:
- /etc/prometheus/rules/*.yml
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
labels:
instance: monitoring
{% for job in prometheus_scrape_targets %}
- job_name: {{ job.job }}
static_configs:
{% for target in job.targets %}
- targets: ['{{ target.address }}']
labels:
instance: {{ target.host }}
{% endfor %}
{% endfor %}