mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-23 21:53:21 +02:00
Update to 2022-12-14 18:00
This commit is contained in:
parent
0ab511e3aa
commit
9c4336ba0a
@ -6,3 +6,6 @@
|
|||||||
when:
|
when:
|
||||||
- not linctl_started.changed
|
- 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'
|
- 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]
|
[Service]
|
||||||
#User=linstor-controller
|
#User=linstor-controller
|
||||||
#Group=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
|
PrivateDevices=yes
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
@ -38,9 +40,18 @@
|
|||||||
when: linctl_ha
|
when: linctl_ha
|
||||||
tags: drbd
|
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
|
- name: Reload systemd
|
||||||
systemd: daemon_reload=True
|
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
|
tags: drbd
|
||||||
|
|
||||||
- name: Install backup hooks
|
- name: Install backup hooks
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
register: linctl_started
|
register: linctl_started
|
||||||
tags: drbd
|
tags: drbd
|
||||||
|
|
||||||
|
- name: Handle log janitor timer
|
||||||
|
systemd: name=linstor-controller-logs-janitor.timer state=started enabled=True
|
||||||
|
tags: drbd
|
||||||
|
|
||||||
- when: linctl_ha
|
- when: linctl_ha
|
||||||
block:
|
block:
|
||||||
- name: Ensure the service is disabled and managed by drbd-reactor
|
- 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
|
daily
|
||||||
rotate 180
|
rotate 180
|
||||||
compress
|
compress
|
||||||
|
Loading…
x
Reference in New Issue
Block a user