From e47e17cf75831cfc77a5e4684b983dda27d1f955 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 25 Nov 2021 17:56:19 +0100 Subject: [PATCH] mail: run migration script after creating db --- roles/mail/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 41e710d..9774da2 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -137,6 +137,7 @@ postgresql_db: name={{ mailman3web_dbname }} owner={{ mailman3_dbuser }} become: true become_user: postgres + register: mailman_createdb - name: Configure mailman3 template: src=mailman/mailman.cfg.j2 dest=/etc/mailman3/mailman.cfg @@ -146,6 +147,12 @@ template: src=mailman/mailman-web.py.j2 dest=/etc/mailman3/mailman-web.py notify: Restart mailman3web +- name: Run mailman3-web migration script + command: + cmd: ./manage.py migrate + chdir: /usr/share/mailman3-web + when: mailman_createdb.changed + - name: Create postfix ssl directory file: path=/etc/postfix/ssl state=directory mode=0750 owner=postfix group=postfix