1
0
forked from infra/ansible

mail: run migration script after creating db

This commit is contained in:
Markus 2021-11-25 17:56:19 +01:00
parent 2276e4efe5
commit e47e17cf75

View File

@ -137,6 +137,7 @@
postgresql_db: name={{ mailman3web_dbname }} owner={{ mailman3_dbuser }} postgresql_db: name={{ mailman3web_dbname }} owner={{ mailman3_dbuser }}
become: true become: true
become_user: postgres become_user: postgres
register: mailman_createdb
- name: Configure mailman3 - name: Configure mailman3
template: src=mailman/mailman.cfg.j2 dest=/etc/mailman3/mailman.cfg 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 template: src=mailman/mailman-web.py.j2 dest=/etc/mailman3/mailman-web.py
notify: Restart mailman3web 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 - name: Create postfix ssl directory
file: path=/etc/postfix/ssl state=directory mode=0750 owner=postfix group=postfix file: path=/etc/postfix/ssl state=directory mode=0750 owner=postfix group=postfix