mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-11-10 13:44:16 +00:00
Extract logging configuration to separate play
This commit is contained in:
parent
6fcef77b3b
commit
72cd8744c2
2 changed files with 32 additions and 27 deletions
|
@ -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
30
tasks/logging.yml
Normal 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"
|
||||
|
||||
|
Loading…
Reference in a new issue