Logrotate entry.
This commit is contained in:
parent
04434716eb
commit
7210f2dade
|
@ -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 }}' }
|
||||
|
|
|
@ -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 }}'
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{{ nextcloud_log_directory }}/*.log {
|
||||
{{ nextcloud_log_rotation_frequency }}
|
||||
missingok
|
||||
rotate {{ nextcloud_log_rotation }}
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
notifempty
|
||||
}
|
Loading…
Reference in New Issue