2018-12-02 22:12:30 +00:00
|
|
|
---
|
2019-08-15 22:41:34 +00:00
|
|
|
- name: Logging config (systemd)
|
|
|
|
block:
|
|
|
|
- name: create logging folder
|
|
|
|
file:
|
|
|
|
name: "{{ matrix_synapse_log_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: synapse
|
|
|
|
group: synapse
|
2018-12-02 22:12:30 +00:00
|
|
|
|
2019-08-15 22:41:34 +00:00
|
|
|
- name: copy syslog config
|
|
|
|
template:
|
|
|
|
src: syslog-synapse.conf.j2
|
|
|
|
dest: /etc/rsyslog.d/matrix_synapse.conf
|
|
|
|
owner: root
|
|
|
|
notify: restart rsyslog
|
2018-12-02 22:12:30 +00:00
|
|
|
|
2019-08-15 22:41:34 +00:00
|
|
|
- name: template logrotate config
|
|
|
|
template:
|
|
|
|
src: logrotate.j2
|
|
|
|
dest: /etc/logrotate.d/matrix_synapse
|
|
|
|
owner: root
|
|
|
|
when: matrix_synapse_supervision_method == "systemd"
|
|
|
|
# TODO: Figure out how to make sure that logging ends up in rsyslog no matter what system we run on
|
2018-12-02 22:12:30 +00:00
|
|
|
|
|
|
|
- name: Deploy log config
|
2019-02-15 02:09:11 +00:00
|
|
|
copy:
|
2018-12-02 22:46:31 +00:00
|
|
|
src: "log.config"
|
2019-02-21 22:17:57 +00:00
|
|
|
dest: "{{ matrix_synapse_base_path }}/log.config"
|
2018-12-02 22:12:30 +00:00
|
|
|
owner: synapse
|
|
|
|
group: synapse
|
|
|
|
notify:
|
2019-02-15 02:08:08 +00:00
|
|
|
- "restart matrix-synapse"
|
2018-12-02 22:12:30 +00:00
|
|
|
|
|
|
|
|