From a8ac1d063abac3f6f0884ff5c5c51507e5ebe05a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Nov 2019 22:57:34 +0100 Subject: [PATCH] remove logrotate integration --- defaults/main.yml | 11 ----------- tasks/install.yml | 9 --------- templates/etc/logrotate.d/config.j2 | 12 ------------ 3 files changed, 32 deletions(-) delete mode 100644 templates/etc/logrotate.d/config.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 6f98a2b..23ce481 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,17 +36,6 @@ matrix_log_synapse_sql_level: INFO matrix_log_ldap_level: INFO matrix_log_ldap_auth_level: INFO -matrix_logrotate_enabled: False -matrix_logrotate_config: - - log: "{{ matrix_log_dir }}/homeserver.log" - options: - - weekly - - rotate 5 - - maxsize 512K - - compress - - delaycompress - - "create 640 {{ matrix_user }} {{ matrix_group }}" - matrix_restart_policy: "on-failure" matrix_server_url: example.com diff --git a/tasks/install.yml b/tasks/install.yml index 024c074..b6b279f 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -65,14 +65,5 @@ src: "etc/systemd/system/matrix.service.j2" dest: "/etc/systemd/system/matrix.service" notify: __matrix_restart - - - name: Copy logrotate config - template: - src: "etc/logrotate.d/config.j2" - dest: "/etc/logrotate.d/matrix" - loop: "{{ matrix_logrotate_config }}" - loop_control: - label: "{{ item.log }}" - when: matrix_logrotate_enabled | bool become: True become_user: root diff --git a/templates/etc/logrotate.d/config.j2 b/templates/etc/logrotate.d/config.j2 deleted file mode 100644 index 143734d..0000000 --- a/templates/etc/logrotate.d/config.j2 +++ /dev/null @@ -1,12 +0,0 @@ -#jinja2: lstrip_blocks: True -{{ ansible_managed | comment }} -{{ item.log }} { - {% for option in item.options %} - {{ option }} - {% endfor %} - copytruncate - sharedscripts - postrotate - /usr/bin/pkill -HUP rsyslogd - endscript -}