61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
- name: install mailman
|
|
package:
|
|
name:
|
|
- mailman3
|
|
- mailman3-web
|
|
- python3-mailman-hyperkitty
|
|
- lynx # needed to convert html mail
|
|
- python3-wheel
|
|
- python3-pip
|
|
- python3-django-auth-ldap
|
|
- python3-mailmanclient
|
|
|
|
- name: install mailman addons via pip
|
|
notify: restart mailman
|
|
pip:
|
|
executable: pip3
|
|
name: git+https://git.cccv.de/infra/uffd/django-auth-ldap-remoteuser.git
|
|
|
|
- name: add ldap sync job
|
|
when: mailman.web.ldap.sync|d(False)
|
|
cron:
|
|
name: "mailman ldap sync"
|
|
user: www-data
|
|
job: /usr/bin/django-admin syncldap --pythonpath /usr/share/mailman3-web --settings settings
|
|
minute: "*/15"
|
|
|
|
- name: copy mailman config
|
|
notify: restart mailman
|
|
template:
|
|
src: mailman.cfg.j2
|
|
dest: /etc/mailman3/mailman.cfg
|
|
mode: 0640
|
|
owner: root
|
|
group: list
|
|
|
|
- name: copy mailman-web config
|
|
notify: restart mailman-web
|
|
template:
|
|
src: mailman-web.py.j2
|
|
dest: /etc/mailman3/mailman-web.py
|
|
mode: 0640
|
|
owner: root
|
|
group: www-data
|
|
|
|
- name: copy mailman-hyperkitty config
|
|
notify: restart mailman
|
|
template:
|
|
src: mailman-hyperkitty.cfg.j2
|
|
dest: /etc/mailman3/mailman-hyperkitty.cfg
|
|
mode: 0640
|
|
owner: root
|
|
group: list
|
|
|
|
- name: flush handlers to get mailman ready
|
|
meta: flush_handlers
|
|
|
|
- name: setup mailing lists
|
|
include_tasks: list.yml
|
|
loop: "{{ mailman.lists.keys()|list }}"
|
|
loop_control:
|
|
loop_var: listname
|