Skip to content
Snippets Groups Projects
Commit 70423c50 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

django tasks

parent 9fd90281
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !437. Comments created here will be created in the context of that merge request.
......@@ -7,6 +7,7 @@
# django-admin createsuperuser --pythonpath /etc/mailman3 --settings settings
- name: install mailman3, mailman3-hyperkitty, python-psycopg2, mailman-web and uwsgi-plugin-python
pacman: name=mailman3,mailman3-hyperkitty,python-psycopg2,mailman-web,uwsgi-plugin-python state=present
register: install
- name: install {mailman,mailman-web} configuration
template: src={{ item.src }} dest={{ item.dest }} owner=root group={{ item.group }} mode=0640
......@@ -50,9 +51,19 @@
become_user: postgres
become_method: su
- name: run Django management tasks
command: django-admin {{ item }} --pythonpath /etc/webapps/mailman-web --settings settings
loop:
- migrate
- loaddata
- collectstatic
- compress
become: true
become_user: mailman-web
when: install.changed
- name: open firewall holes for mailman (LMTP)
ansible.posix.firewalld: port=8024/tcp zone=wireguard permanent=true state=enabled immediate=yes
when: configure_firewall
tags:
- firewall
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment