mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
Update to 2022-12-14 18:00
This commit is contained in:
parent
0ab511e3aa
commit
9c4336ba0a
@ -6,3 +6,6 @@
|
||||
when:
|
||||
- not linctl_started.changed
|
||||
- not linctl_ha or linctl_services.ansible_facts.services['linstor-controller.service'] is defined and linctl_services.ansible_facts.services['linstor-controller.service'].state == 'started'
|
||||
|
||||
- name: restart linstor-controller-logs-janitor
|
||||
systemd: name=linstor-controller-logs-janitor.timer state=restarted
|
||||
|
@ -10,6 +10,8 @@
|
||||
[Service]
|
||||
#User=linstor-controller
|
||||
#Group=linstor-controller
|
||||
# Empty the error database on startup, to prevent unbounded growth
|
||||
ExecStartPre=/bin/rm -f /var/log/linstor-controller/error-report.mv.db
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
@ -38,9 +40,18 @@
|
||||
when: linctl_ha
|
||||
tags: drbd
|
||||
|
||||
- name: Install controller logs janitor
|
||||
template: src=linstor-controller-logs-janitor.{{ item }}.j2 dest=/etc/systemd/system/linstor-controller-logs-janitor.{{ item }}
|
||||
loop:
|
||||
- service
|
||||
- timer
|
||||
notify: restart linstor-controller-logs-janitor
|
||||
register: linctl_janitor_unit
|
||||
tags: drbd
|
||||
|
||||
- name: Reload systemd
|
||||
systemd: daemon_reload=True
|
||||
when: linctl_unit.changed or (linctl_data_unit is defined and linctl_data_unit.changed)
|
||||
when: linctl_unit.changed or (linctl_data_unit is defined and linctl_data_unit.changed) or linctl_janitor_unit.results | selectattr('changed','equalto',True) | list | length > 0
|
||||
tags: drbd
|
||||
|
||||
- name: Install backup hooks
|
||||
|
@ -6,6 +6,10 @@
|
||||
register: linctl_started
|
||||
tags: drbd
|
||||
|
||||
- name: Handle log janitor timer
|
||||
systemd: name=linstor-controller-logs-janitor.timer state=started enabled=True
|
||||
tags: drbd
|
||||
|
||||
- when: linctl_ha
|
||||
block:
|
||||
- name: Ensure the service is disabled and managed by drbd-reactor
|
||||
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Remove old Linstor controllers logs
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
PrivateTmp=yes
|
||||
ExecStart=/sbin/tmpwatch -m 5d /var/log/linstor-controller/
|
||||
TimeoutSec=30m
|
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Remove old Linstor controllers logs
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
RandomizedDelaySec=5m
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
@ -1,4 +1,4 @@
|
||||
/var/log/linstor/rest-access.log {
|
||||
/var/log/linstor-controller/rest-access.log {
|
||||
daily
|
||||
rotate 180
|
||||
compress
|
||||
|
Loading…
x
Reference in New Issue
Block a user