set up otel stack

This commit is contained in:
Jef Roosens 2026-04-04 21:59:17 +02:00
parent 74f8edf024
commit f58bf336d6
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
16 changed files with 2423 additions and 0 deletions

View file

@ -0,0 +1,3 @@
grafana.roosens.me {
reverse_proxy localhost:3000
}

View file

@ -0,0 +1,5 @@
---
- name: 'restart grafana'
ansible.builtin.service:
name: 'grafana-server'
state: 'restarted'

View file

@ -0,0 +1,3 @@
---
dependencies:
- role: any.tools.caddy

View file

@ -0,0 +1,44 @@
---
- name: Ensure Grafana is installed
ansible.builtin.apt:
deb: 'https://dl.grafana.com/grafana/release/12.3.3/grafana_12.3.3_21957728731_linux_amd64.deb'
notify: 'restart grafana'
- name: Ensure data directory permissions are correct
ansible.builtin.file:
path: '{{ item }}'
state: 'directory'
owner: 'grafana'
group: 'grafana'
loop:
- '{{ grafana_data_dir }}'
- '{{ grafana_logs_dir }}'
- name: Ensure configuration directory is present
ansible.builtin.file:
path: '/etc/grafana'
state: directory
mode: '0755'
- name: Ensure config file is present
ansible.builtin.template:
src: 'grafana.ini.j2'
dest: '/etc/grafana/grafana.ini'
mode: '0644'
owner: 'root'
group: 'root'
notify: 'restart grafana'
- name: Ensure service is enabled
ansible.builtin.service:
name: 'grafana-server'
enabled: true
- name: Ensure Caddyfile is present
ansible.builtin.copy:
src: 'grafana.Caddyfile'
dest: '/etc/caddy/grafana.Caddyfile'
owner: root
group: root
mode: '0644'
notify: reload caddy

File diff suppressed because it is too large Load diff