-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathnextcloud.yml
More file actions
executable file
·168 lines (134 loc) · 3.44 KB
/
nextcloud.yml
File metadata and controls
executable file
·168 lines (134 loc) · 3.44 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/usr/bin/env ansible-playbook
- name: Prepare the OS
hosts: all
become: true
gather_facts: true
roles:
- os
- firewall
- name: Pre-flight configuration checks
hosts: localhost
gather_facts: false
roles:
- precheck
- name: Install redis or valkey
hosts: redis
become: true
gather_facts: false
roles:
- redis
- name: Install webserver
hosts: webserver
become: true
gather_facts: false
roles:
- webserver
- name: Install tls certificates
hosts: nextcloud, coturn, signal, onlyoffice, nextcloudoffice, whiteboard
become: true
gather_facts: false
roles:
- tls-certificate
- name: Install database server
hosts: database
become: true
gather_facts: false
roles:
- role: mariadb
when: (nextcloud_db.type == 'mysql')
- role: postgres
when: (nextcloud_db.type == 'pgsql')
- name: Install Docker
hosts: docker
become: true
gather_facts: false
roles:
- docker
- name: Install HaPR für exAPPs
hosts: hapr
become: true
gather_facts: false
roles:
- role: exapp_hapr
when: nextcloud_install.hapr|bool
- name: Install elasticsearch
hosts: elasticsearch
become: true
gather_facts: false
roles:
- role: fulltextsearch
when: nextcloud_install.fulltextsearch|bool
- name: Install nextcloudoffice
hosts: nextcloudoffice
become: true
gather_facts: false
roles:
- role: nextcloudoffice
when: nextcloud_install.nextcloudoffice|bool
- name: Install OnlyOffice
hosts: onlyoffice
become: true
gather_facts: false
roles:
- role: onlyoffice
when: nextcloud_install.onlyoffice|bool
- name: Install Whiteboard
hosts: whiteboard
become: true
gather_facts: false
roles:
- role: whiteboard
when: nextcloud_install.whiteboard|bool
- name: Install coturn server
hosts: coturn
become: true
gather_facts: false
roles:
- role: coturn
when: nextcloud_install.talk|bool
- name: Install signal server
hosts: signal
become: true
gather_facts: false
roles:
- role: signal
when: nextcloud_install.hpb|bool
- name: Start Docker containers
hosts: docker
become: true
gather_facts: false
tasks:
- name: Start Docker containers
ansible.builtin.include_tasks: roles/docker/tasks/compose_up.yml
- name: Install nextcloud
hosts: nextcloud
become: true
gather_facts: false
roles:
- role: restic_backup
when: restic_repo != []
- php
- nextcloud_prepare
- nextcloud_install
- nextcloud_app
- role: postgres_analyzer
when: nextcloud_db.type == 'pgsql'
- php_fpm_analyser
environment: "{{ nextcloud_occ_env }}"
post_tasks:
- name: Check install status
ansible.builtin.uri:
url: https://{{ nextcloud_fqdn }}/status.php
return_content: true
validate_certs: "{% if (tls_certificate.type == 'selfsigned') or tls_certificate_test %}no{% else %}yes{% endif %}"
register: nextcloud_status
- name: We are ready
ansible.builtin.assert:
that: nextcloud_status.json.installed
fail_msg:
- "Upss. Something went wrong."
- "Your Nextcloud at https://{{ nextcloud_fqdn }} is down."
success_msg:
- "Your Nextcloud {{ nextcloud_status.json.version }} at https://{{ nextcloud_fqdn }} is ready."
- "Login with user: {{ nextcloud_admin }} and password: {{ passwords.nextcloud_admin }}"
- "Other secrets you'll find in the {{ password_file }}."