diff --git a/roles/samba/templates/logrotate.conf.j2 b/roles/samba/templates/logrotate.conf.j2 new file mode 100644 index 0000000..731be8c --- /dev/null +++ b/roles/samba/templates/logrotate.conf.j2 @@ -0,0 +1,11 @@ +/var/log/samba/*.log +/var/log/samba/json/*.log +/var/log/samba/log.*[!.][!xg][!z] +{ + daily + rotate 180 + notifempty + compress + missingok + copytruncate +} diff --git a/roles/seafile/tasks/install.yml b/roles/seafile/tasks/install.yml index f6dda02..53c2f8f 100644 --- a/roles/seafile/tasks/install.yml +++ b/roles/seafile/tasks/install.yml @@ -4,6 +4,15 @@ yum: name={{ seafile_packages }} tags: seafile +- name: Install MariaDB libs + yum: + name: + - MariaDB-shared + when: + - mysql_mariadb_version is defined + - mysql_mariadb_version != 'default' + tags: seafile + - name: Check if py2 venv is setup stat: path={{ seafile_root_dir }}/bin/python2 register: seafile_py2 diff --git a/roles/seafile/templates/logrotate.conf.j2 b/roles/seafile/templates/logrotate.conf.j2 index e23a1cc..2bbdda9 100644 --- a/roles/seafile/templates/logrotate.conf.j2 +++ b/roles/seafile/templates/logrotate.conf.j2 @@ -1,7 +1,14 @@ -{{ seafile_root_dir }}/logs/*.log { +{% for log in ['ccnet','controller','elasticsearch_deprecation','elasticsearch_index_indexing_slowlog','elasticsearch_index_search_slowlog','file_updates_sender','gunicorn_error','index','seafdav','seaf-fuse','seafile','seahub_email_sender','virus_scan'] %} +{{ seafile_root_dir }}/logs/{{ log }} +{% endfor %} +{% for log in ['seafile_slow_rpc','seafile_slow_storage'] %} +{{ seafile_root_dir }}/logs/slow_logs/{{ log }} +{% endfor %} +{ weekly rotate 52 compress missingok copytruncate + su seafile seafile }