From e9f1cf265b39481d4ce671caecd1d62465014fad Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 8 Mar 2021 15:23:39 +0100 Subject: [PATCH] [mailman] Install dedicated modules instead of sourcing them from /usr/scripts Signed-off-by: Yohann D'ANELLO --- roles/mailman3/tasks/main.yml | 7 +++++-- roles/mailman3/templates/mailman3/mailman-web.py.j2 | 6 +----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/roles/mailman3/tasks/main.yml b/roles/mailman3/tasks/main.yml index 181cbc19..f73b5800 100644 --- a/roles/mailman3/tasks/main.yml +++ b/roles/mailman3/tasks/main.yml @@ -13,9 +13,12 @@ retries: 3 until: apt_result is succeeded -- name: Install django-allauth-cas from PIP +- name: Install Crans python modules pip: - name: django-allauth-cas + name: "{{ item }}" + loop: + - git+https://gitlab.crans.org/nounous/mailman-crans-theme.git + - git+https://gitlab.crans.org/nounous/allauth-cas-crans.git # You will need to setup postgres # sudo -u postgres createuser -P mailman3 diff --git a/roles/mailman3/templates/mailman3/mailman-web.py.j2 b/roles/mailman3/templates/mailman3/mailman-web.py.j2 index 1d0c46f8..2f201cfb 100644 --- a/roles/mailman3/templates/mailman3/mailman-web.py.j2 +++ b/roles/mailman3/templates/mailman3/mailman-web.py.j2 @@ -30,12 +30,8 @@ MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1') # Application definition -# Add allauth_cas_crans path -import sys -sys.path.insert(0, "/usr/scripts/mailman") - INSTALLED_APPS = ( - 'mailman_theme_crans', # override templates + 'mailman_crans_theme', # override templates 'hyperkitty', 'postorius', 'django_mailman3',