Logrotate entry.

This commit is contained in:
Andrea Dell'Amico 2021-08-11 17:57:22 +02:00
parent 04434716eb
commit 7210f2dade
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 21 additions and 1 deletions

View File

@ -12,7 +12,10 @@ nextcloud_data_dir: '{{ nextcloud_data_base_dir }}/nextcloud/data'
nextcloud_oc_dir: '{{ nextcloud_data_base_dir }}/nextcloud/oc_keys'
nextcloud_log_directory: /var/log/nextcloud
nextcloud_log_backend: file
nextcloud_log_level: warning
# debug|info|warning|error|fatal
nextcloud_log_level: info
nextcloud_log_rotation_frequency: weekly
nextcloud_log_rotation: 52
nextcloud_servername: '{{ ansible_fqdn }}'
nextcloud_servernames:
- { webroot: '{{ nextcloud_web_root }}', id: 1, name: '{{ nextcloud_servername }}' }

View File

@ -17,6 +17,14 @@
group: '{{ item.user }}'
with_items: '{{ phpfpm_pools }}'
- name: Install the logrotate configuration for nextcloud
template:
src: nextcloud-logrotate.conf.j2
dest: /etc/logrotate.d/nextcloud
owner: root
group: root
mode: 0444
- name: Create the nextcloud data directory
file:
dest: '{{ nextcloud_data_dir }}'

View File

@ -0,0 +1,9 @@
{{ nextcloud_log_directory }}/*.log {
{{ nextcloud_log_rotation_frequency }}
missingok
rotate {{ nextcloud_log_rotation }}
compress
delaycompress
copytruncate
notifempty
}