Files
gballan 3d8bdafd28
ci/woodpecker/push/woodpecker Pipeline failed
Moving prometheus targets to group_vars
2026-10-05 17:35:23 -04:00

68 lines
1.8 KiB
YAML

---
- name: Deploy standalone Prometheus on Raspberry Pi 5
hosts: monitoring_server
become: true
vars:
# Bind to all interfaces on default port
prometheus_web_listen_address: "0.0.0.0:9090"
# Reduce retention to save storage/microSD wear (default is 15d)
prometheus_storage_retention: "60d"
# Self-scrape configuration
prometheus_scrape_configs:
- job_name: "prometheus"
metrics_path: "/metrics"
static_configs:
- targets: "{{ prometheus_prometheus_targets }}"
- job_name: "node_exporter"
metrics_path: "/metrics"
static_configs:
- targets: "{{ prometheus_node_exporter_targets }}"
roles:
- role: prometheus.prometheus.prometheus
- name: Deploy Grafana on Raspberry Pi 5
hosts: monitoring_server
become: true
pre_tasks:
- name: Ensure python3-debian is present for deb822 repository support
ansible.builtin.apt:
name: python3-debian
state: present
update_cache: true
roles:
- role: grafana.grafana.grafana
vars:
grafana_version: "latest"
# All grafana.ini sections now live under grafana_ini
grafana_ini:
server:
http_port: 3000
http_addr: "0.0.0.0"
security:
admin_user: "admin"
admin_password: "LimpBizkit6"
analytics:
reporting_enabled: false
check_for_updates: false
# Provision datasources directly
grafana_datasources:
- name: "Prometheus"
type: "prometheus"
access: "proxy"
url: "http://localhost:9090"
isDefault: true
editable: true
# Optional: install community plugins automatically
# grafana_plugins:
# - grafana-piechart-panel