ansible-role-mailserver/tasks/mailman.yml

59 lines
1.2 KiB
YAML
Raw Normal View History

2020-07-24 15:08:50 +02:00
- name: mailman - install
2020-07-20 09:46:16 +02:00
package:
state: latest
2020-07-24 15:43:21 +02:00
name: mailman
2020-07-24 15:08:50 +02:00
- name: mailman - mm_config
notify:
- mailman genaliases
- reload postfix
template:
src: mailman_cfg.py
dest: /etc/mailman/mm_cfg.py
2020-07-24 15:43:21 +02:00
#
# Web - part
#
- name: mailman - install fcgiwrap
when: mailserver_mailman_web
package:
state: latest
name: fcgiwrap
- name: mailman - start and enable fcgiwrap
when: mailserver_mailman_web
systemd:
name: fcgiwrap.socket
state: started
enabled: yes
- name: mailman - get cert for web
notify: dehydrated
when: mailserver_mailman_web
lineinfile:
path: /etc/dehydrated/domains.txt
line: "{{ mailserver_mailman_domains | map(attribute='web') | join(' ') }}"
- name: mailman - nginx domain
notify: reload nginx
when: mailserver_mailman_web
template:
src: mailman-domain.nginx
dest: /etc/nginx/sites.d/mailman.act
### END Web - part
2020-07-24 15:08:50 +02:00
- name: mailman - enable timer
systemd:
name: "{{ item }}"
state: started
enabled: yes
with_items:
- mailman-checkdbs.timer
- mailman-disabled.timer
- mailman-mailpasswds.timer
- mailman-senddigests.timer
- mailman-cullbadshunt.timer
- mailman-gatenews.timer
- mailman-nightlygzip.timer