add the ansible playbooks for the monitoring stack
This commit is contained in:
37
ansible/playbook.yml
Normal file
37
ansible/playbook.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- 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)"
|
||||
Reference in New Issue
Block a user