Extract logging configuration to separate play

This commit is contained in:
Emmanouil Kampitakis 2018-12-02 23:12:30 +01:00
parent 6fcef77b3b
commit 72cd8744c2
2 changed files with 32 additions and 27 deletions

View file

@ -29,33 +29,6 @@
notify:
- "restart synapse"
- name: create logging folder
file:
name: /var/log/synapse/
state: directory
owner: synapse
group: synapse
- name: copy syslog config
copy:
src: matrix_synapse.conf
dest: /etc/rsyslog.d/matrix_synapse.conf
owner: root
notify: restart rsyslog
- name: template logrotate config
template:
src: logrotate.j2
dest: /etc/logrotate.d/matrix_synapse
- name: Deploy log config
template:
src: "log.config.j2"
dest: "/opt/synapse/log.config"
owner: synapse
group: synapse
notify:
- "restart synapse"
- name: Deploy config
template:
@ -66,6 +39,8 @@
notify:
- "restart synapse"
- name: Configure logging
import_tasks: logging.yml
- name: ensure hook directory available
file:
name: /etc/letsencrypt/renewal-hooks/deploy/

30
tasks/logging.yml Normal file
View file

@ -0,0 +1,30 @@
---
- name: create logging folder
file:
name: /var/log/synapse/
state: directory
owner: synapse
group: synapse
- name: copy syslog config
copy:
src: matrix_synapse.conf
dest: /etc/rsyslog.d/matrix_synapse.conf
owner: root
notify: restart rsyslog
- name: template logrotate config
template:
src: logrotate.j2
dest: /etc/logrotate.d/matrix_synapse
- name: Deploy log config
template:
src: "log.config.j2"
dest: "/opt/synapse/log.config"
owner: synapse
group: synapse
notify:
- "restart synapse"