Update to 2020-05-11 20:00

master
Daniel Berteaud 5 years ago
parent 2d1b95e0dc
commit f218dc70f8
  1. 15
      roles/matrix_synapse/tasks/cleanup.yml
  2. 19
      roles/matrix_synapse/tasks/install.yml

@ -1,12 +1,15 @@
--- ---
- name: Remove unused and tmp files - name: Remove unused and tmp files
file: path={{ synapse_root_dir }}/{{ item }} state=absent file: path={{ item }} state=absent
loop: loop:
- lib - "{{ synapse_root_dir }}/lib"
- lib64 - "{{ synapse_root_dir }}/lib64"
- include - "{{ synapse_root_dir }}/include"
- bin - "{{ synapse_root_dir }}/bin"
- db_dumps - "{{ synapse_root_dir }}/db_dumps"
- "{{ synapse_root_dir }}/res/synapse_janitor.sql"
- "{{ synapse_root_dir }}/venv/bin/synapse_janitor.sh"
- /etc/cron.d/matrix_synapse
tags: matrix tags: matrix

@ -110,22 +110,3 @@
- post - post
tags: matrix tags: matrix
- name: Install synapse_janitor.sql script
get_url:
url: https://raw.githubusercontent.com/xwiki-labs/synapse_scripts/master/synapse_janitor.sql
dest: "{{ synapse_root_dir }}/res/"
tags: matrix
- name: Deploy janitor script
template: src=synapse_janitor.sh.j2 dest={{ synapse_root_dir }}/venv/bin/synapse_janitor.sh mode=700
tags: matrix
- name: Setup cron job to clean synapse database
cron:
name: matrix_synapse_janitor
special_time: weekly
user: root
job: '{{ synapse_root_dir }}/venv/bin/synapse_janitor.sh | /bin/systemd-cat'
cron_file: matrix_synapse
tags: matrix

Loading…
Cancel
Save