[mailman3] Automatically apply migrations and compress static files

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-03-01 18:13:19 +01:00 committed by ynerant
parent ee31feffe9
commit 95d6086863
1 changed files with 12 additions and 1 deletions

View File

@ -41,7 +41,6 @@
# You will need to setup postgres
# sudo -u postgres createuser -P mailman3web
# sudo -u postgres createdb -O mailman3web mailman3web
# Then migrate data: sudo /usr/share/mailman3-web/manage.py migrate
- name: Configure mailman3-web
template:
src: mailman3/mailman-web.py.j2
@ -57,6 +56,18 @@
dest: /usr/local/bin/mailman-web
state: link
- name: Migrate Django database
django_manage:
command: migrate
project_path: /usr/share/mailman3-web
notify: Restart mailman3-web
- name: Compress static files
django_manage:
command: compress
project_path: /usr/share/mailman3-web
notify: Restart mailman3-web
- name: Indicate role in motd
template:
src: update-motd.d/05-service.j2