Files
deploy-monitoring/ansible/playbook.yml

38 lines
899 B
YAML

---
- name: Deploy monitoring stack on RPi
hosts: monitoring
become: true
vars:
# Architecture detection for ARM
arch_map:
armv7l: "armv7"
aarch64: "arm64"
x86_64: "amd64"
pre_tasks:
- name: Gather architecture
ansible.builtin.set_fact:
go_arch: "{{ arch_map[ansible_architecture] | default('arm64') }}"
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == "Debian"
roles:
- common
- prometheus
- snmp_exporter
- promtail
- grafana
post_tasks:
- name: Display access information
ansible.builtin.debug:
msg:
- "Grafana: http://{{ ansible_host }}:3000 (admin/admin)"
- "Prometheus: http://{{ ansible_host }}:9090"
- "Syslog listener: {{ ansible_host }}:514 (UDP)"