add victoria logs
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s
This commit is contained in:
29
playbooks/logs.yml
Normal file
29
playbooks/logs.yml
Normal 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
|
||||
@@ -21,7 +21,7 @@
|
||||
- rsync
|
||||
- unzip
|
||||
- ca-certificates
|
||||
|
||||
- systemd-journal-upload
|
||||
#state: latest
|
||||
state: present
|
||||
|
||||
|
||||
Reference in New Issue
Block a user