mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 15:47:32 +02:00
Update to 2022-03-07 14:00
This commit is contained in:
21
roles/unmaintained/wh_backend/templates/logrotate.j2
Normal file
21
roles/unmaintained/wh_backend/templates/logrotate.j2
Normal file
@@ -0,0 +1,21 @@
|
||||
# {{ ansible_managed }}
|
||||
{% for client in wh_clients %}
|
||||
{% for app in client.apps %}
|
||||
{% set app = wh_default_app | combine(app, recursive=True) %}
|
||||
{% if app.backend | default(client.backend) | default(wh_defaults.backend) == inventory_hostname %}
|
||||
/opt/wh/{{ client.name }}/apps/{{ app.name }}/logs/*.log {
|
||||
rotate 52
|
||||
weekly
|
||||
copytruncate
|
||||
missingok
|
||||
compress
|
||||
compressoptions -T0
|
||||
compresscmd /bin/xz
|
||||
uncompresscmd /bin/unxz
|
||||
compressext .xz
|
||||
su {{ app.run_as | default('wh-' + client.name) }} {{ app.run_as | default('wh-' + client.name) }}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user