make log dir configurable

This commit is contained in:
Jan Christian Grünhage 2019-03-24 16:51:22 +01:00
parent d6b84e49af
commit c0ae9920d8
4 changed files with 7 additions and 5 deletions

View file

@ -8,6 +8,7 @@ matrix_synapse_dh_path: "{{ matrix_synapse_base_path }}/tls/{{ matrix_server_nam
matrix_synapse_baseurl: "https://{{ matrix_server_name }}"
matrix_synapse_signing_key_path: "{{ matrix_synapse_base_path }}/tls/{{ matrix_server_name }}.signing.key"
matrix_synapse_version: "v0.99.2"
matrix_synapse_log_dir: "/var/log/matrix_synapse"
matrix_synapse_log_days_keep: 30
matrix_synapse_skip_tls: false
matrix_synapse_pid_file: "{{ matrix_synapse_base_path }}/synapse.pid"

View file

@ -1,2 +0,0 @@
if $programname == 'matrix_synapse' then /var/log/matrix_synapse/matrix_synapse.log
if $programname == 'matrix_synapse' then ~

View file

@ -1,14 +1,14 @@
---
- name: create logging folder
file:
name: /var/log/synapse/
name: "{{ matrix_synapse_log_dir }}"
state: directory
owner: synapse
group: synapse
- name: copy syslog config
copy:
src: matrix_synapse.conf
template:
src: syslog-synapse.conf.j2
dest: /etc/rsyslog.d/matrix_synapse.conf
owner: root
notify: restart rsyslog
@ -17,6 +17,7 @@
template:
src: logrotate.j2
dest: /etc/logrotate.d/matrix_synapse
owner: root
- name: Deploy log config
copy:

View file

@ -0,0 +1,2 @@
if $programname == 'matrix_synapse' then {{ matrix_synapse_log_dir }}/matrix_synapse.log
if $programname == 'matrix_synapse' then ~