blob: e5b78da622d0a5b9369a4fc37aab150de5980b3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
---
- yum: name={{ item }} state=installed
with_items:
- mailman
- git
- pwgen
- command: creates=/var/lib/mailman/lists/mailman /usr/lib/mailman/bin/newlist -q mailman root@{{ ansible_domain }} {{ mailman_pass }}
#
# this is a ugly work around for https://github.com/ansible/ansible-modules-core/issues/127
- file: name=/etc/systemd/system/mailman.service.d/ state=directory
when: ansible_distribution == 'Fedora' or ansible_distribution_major_version == '7'
- copy: mode=0644 src=fix_ansible.conf dest=/etc/systemd/system/mailman.service.d/fix_ansible_bug.conf
when: ansible_distribution == 'Fedora' or ansible_distribution_major_version == '7'
- template: src=mm_cfg.py dest=/etc/mailman/mm_cfg.py
- service: name=mailman state=started enabled=yes
- template: src=aliases dest=/etc/postfix/aliases.mailman_default
notify: update mailman aliases
- template: src=vhost.conf dest=/etc/httpd/conf.d/{{ website_url | default( ansible_hostname ) }}.conf
notify: restart httpd
- copy: mode=0755 src=update_templates_mailman.sh dest=/usr/local/bin/update_templates_mailman.sh
- cron: name="update mailman {{ mailman_git }}" job="/usr/local/bin/update_templates_mailman.sh {{ mailman_git }}" minute="*/5"
when: mailman_git is defined
- copy: mode=0755 src=dump_mailman.sh dest=/usr/local/bin/dump_mailman.sh
- cron: name="dump mailman" job=/usr/local/bin/dump_mailman.sh hour=3 minute=30
|