blob: 0d5eac101e75cf91fa5834fd1d8423fbd3028488 (
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
|
- 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
- name: Configure Sympa
copy: src=etc/sympa/{{ item }}
dest=/etc/sympa/{{ item }}
owner=root group=sympa
mode=0644
with_items:
- sympa/sympa.conf
- topics.conf
register: r1
notify:
- Restart Sympa
- name: Create Virtual hosts for Sympa (1)
file: path=/etc/sympa/{{ item }}
state=directory
owner=sympa group=sympa
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=sympa group=sympa
mode=0640
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
|