blob: b8140c4d54524ac9ed4344225d564ba5e8f65a54 (
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
|
- name: install packages
dnf:
name: '{{ synapse_packages }}'
state: present
- import_tasks: freeipa.yml
- name: create home directory
file:
path: '{{ item }}'
owner: '{{ synapse_user }}'
group: '{{ synapse_user }}'
mode: 0700
state: directory
loop:
- '{{ synapse_home }}'
- '{{ synapse_venv }}'
- name: install synapse
pip:
name: '{{ synapse_pip_packages }}'
virtualenv: '{{ synapse_venv }}'
state: latest
become: yes
become_user: '{{ synapse_user }}'
notify: restart synapse
- name: generate synapse configuration
template:
src: '{{ synapse_home[1:] }}/{{ item }}.j2'
dest: '{{ synapse_home }}/{{ item }}'
owner: '{{ synapse_user }}'
group: '{{ synapse_user }}'
mode: 0644
notify: restart synapse
loop:
- homeserver.yaml
- logging.config
- name: generate signing key
copy:
content: |
{{ synapse_signing_key }}
dest: '{{ synapse_home }}/{{ synapse_domain }}.signing.key'
owner: '{{ synapse_user }}'
group: '{{ synapse_user }}'
mode: 0644
become: yes
become_user: '{{ synapse_user }}'
- name: create systemd unit
template:
src: etc/systemd/system/synapse.service.j2
dest: /etc/systemd/system/synapse.service
register: synapse_systemd_unit
notify: restart synapse
- name: reload systemd daemons
systemd:
daemon_reload: yes
when: synapse_systemd_unit.changed
- import_tasks: database.yml
- name: enable systemd unit
systemd:
name: synapse
enabled: yes
state: started
- import_tasks: element.yml
tags: element
|