blob: 284f320166140d82718c42d1d07121bf464e0f5b (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
- apt: pkg={{ packages }} install_recommends=no
vars:
packages:
- mariadb-server
- sympa
- libnet-dns-perl
- libnet-dns-sec-perl
- libmail-dkim-perl
- libcrypt-smime-perl
- libcrypt-openssl-x509-perl
- name: Make the 'sympa' MySQL user use unix_socket
mysql_user2: name=sympa password= auth_plugin=unix_socket
state=present
# XXX We want to change the retun-path for sendpasswd notices from
# 'sympa-request@$robot' to 'noreply@fripost.org'.
# * /usr/lib/cgi-bin/sympa/wwsympa.fcgi
# do_requestpasswd, do_subrequest
# add $param->{'return_path'}='noreply@fripost.org';
# * /usr/share/sympa/lib/List.pm
# send_global_file
# $data->{'return_path'} //= &Conf::get_robot_conf($robot, 'request');
# * /usr/share/sympa/default/scenari/send.newsletter
# last line
# true() smtp,dkim,smime,md5 -> reject,quiet
# See #787946.
- name: Configure Sympa
copy: src=etc/sympa/{{ item }}
dest=/etc/sympa/{{ item }}
owner=root group=sympa
mode=0644
with_items:
- sympa.conf
- wwsympa.conf
- topics.conf
register: r1
notify:
- Restart Sympa
- name: Create Virtual hosts for Sympa (1)
file: path=/etc/sympa/{{ item }}
state=directory
owner=root group=root
mode=0755
with_items:
- lists.fripost.org
register: r2
notify:
- Restart Sympa
- name: Create Virtual hosts for Sympa (2)
file: path=/var/lib/sympa/list_data/{{ item }}
state=directory
owner=sympa group=sympa
mode=0770
with_items:
- lists.fripost.org
register: r3
notify:
- Restart Sympa
- name: Install robot.conf
template: src=etc/sympa/robot.conf.j2
dest=/etc/sympa/{{ item }}/robot.conf
owner=root group=root
mode=0644
with_items:
- lists.fripost.org
register: r4
notify:
- Restart Sympa
- name: Enable Sympa
service: name=sympa enabled=yes
- name: Start Sympa
service: name=sympa state=started
when: not (r1.changed or r2.changed or r3.changed or r4.changed)
- meta: flush_handlers
- name: Copy wwsympa.{service,socket}
copy: src=etc/systemd/system/{{ item }}
dest=/etc/systemd/system/{{ item }}
owner=root group=root
mode=0644
notify:
- systemctl daemon-reload
- Restart wwsympa
with_items:
- wwsympa.service
- wwsympa.socket
- meta: flush_handlers
- name: Enable WWSympa
service: name=wwsympa enabled=yes
- name: Start WWSympa
service: name=wwsympa state=started
|