add victoria logs
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s

This commit is contained in:
hogweed1
2026-06-13 02:47:14 +10:00
parent 89b26bd966
commit 03baa7bb23
2 changed files with 30 additions and 1 deletions

29
playbooks/logs.yml Normal file
View File

@@ -0,0 +1,29 @@
---
- name: Настройка systemd-journal-upload
hosts: all
become: yes
tasks:
- name: Проверяем что systemd-journal-upload включен как служба и работает.
systemd:
name: systemd-journal-upload
state: started
enabled: true
- name: Настройка конфига под MikroTik
copy:
dest: /etc/systemd/journal-upload.conf
mode: '0644'
content: |
[Upload]
# URL=
# ServerKeyFile=/etc/ssl/private/journal-upload.pem
# ServerCertificateFile=/etc/ssl/certs/journal-upload.pem
# TrustedCertificateFile=/etc/ssl/ca/trusted.pem
URL=http://victorialogs.guaranteedstruggle.host:9428/insert/journald
register: journald_config
- name: Перезапуск службы при изменении настроек
systemd:
name: systemd-journal-upload
state: restarted
when: journald_config.changed

View File

@@ -21,7 +21,7 @@
- rsync - rsync
- unzip - unzip
- ca-certificates - ca-certificates
- systemd-journal-upload
#state: latest #state: latest
state: present state: present