No description
Find a file
2026-04-05 19:45:53 +00:00
defaults initial commit 2026-04-05 19:45:53 +00:00
handlers initial commit 2026-04-05 19:45:53 +00:00
meta initial commit 2026-04-05 19:45:53 +00:00
tasks initial commit 2026-04-05 19:45:53 +00:00
.gitignore initial commit 2026-04-05 19:45:53 +00:00
README.md initial commit 2026-04-05 19:45:53 +00:00

ansible-roles-metrics

This role will deploy a full metrics stack including grafana, prometheus, loki, promtail, node exporter, and kuma-uptime

External roles are expected to handle firewall and reverse proxy configuration

- name: Setup a metrics hosts
  hosts: metrics
  become: true
  roles:
    - role: metrics
      metrics_grafana: true
      metrics_prometheus: true
      metrics_loki: true
      metrics_uptime: true
    - role: traefik
      traefik_user: metrics
      traefik_pod: metrics
      traefik_api: true
      traefik_dashboard: true
      traefik_routes:
        - name: grafana
          domain: "{{ grafana_url }}"
          srv: "{{ grafana_port }}"
        - name: loki
          domain: "{{ loki_url }}"
          srv: "{{ loki_port }}"
        - name: uptime
          domain: "{{ uptime_url }}"
          srv: "{{ uptime_port }}"
    - role: firewalld
      firewalld_services:
        - dhcpv6-client
        - ssh
        - http
        - https
      firewalld_forwards:
        - port: 80
          to: 8080
        - port: 443
          to: 8443

Update Prometheus config without touching the rest of the stack

ansible-playbook -i hosts site.yml --tags=prometheus-config --limit=metric