-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
156 lines (146 loc) · 5.75 KB
/
main.yml
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
# Copyright 2020-2025 Chris Croome
#
# This file is part of the Webarchitects ONLYOFFICE Ansible role.
#
# The Webarchitects ONLYOFFICE Ansible role is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# The Webarchitects ONLYOFFICE Ansible role is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with the Webarchitects ONLYOFFICE Ansible role. If not, see <https://www.gnu.org/licenses/>.
---
# https://docs.ansible.com/ansible/latest/playbook_guide/complex_data_manipulation.html
onlyofficevarnames: "{{ q('varnames', '^onlyoffice_') | sort }}"
onlyofficehostvars: "{{ dict(onlyofficevarnames | list | zip(q('vars', *onlyofficevarnames))) }}"
# Ansible JMESPath queries
# https://docs.ansible.com/ansible/latest/collections/community/general/docsite/filter_guide_selecting_json_data.html
onlyoffice_jpq_db_host: "[?question=='onlyoffice/db-host'].value|[0]"
onlyoffice_jpq_db_name: "[?question=='onlyoffice/db-name'].value|[0]"
onlyoffice_jpq_db_port: "[?question=='onlyoffice/db-port'].value|[0]"
onlyoffice_jpq_db_type: "[?question=='onlyoffice/db-type'].value|[0]"
onlyoffice_jpq_db_user: "[?question=='onlyoffice/db-user'].value|[0]"
onlyoffice_jpq_docservice_port: "[?question=='onlyoffice/docservice-port'].value|[0]"
onlyoffice_jpq_ds_port: "[?question=='onlyoffice/ds-port'].value|[0]"
onlyoffice_jpq_ds_type: "[?question=='onlyoffice/ds-type'].value|[0]"
onlyoffice_jpq_jwt_header: "[?question=='onlyoffice/jwt-header'].value|[0]"
onlyoffice_jpq_mariadb_service: 'services.["mariadb.service"]|[0].state'
onlyoffice_jpq_rabbitmq_host: "[?question=='onlyoffice/rabbitmq-host'].value|[0]"
onlyoffice_jpq_rabbitmq_proto: "[?question=='onlyoffice/rabbitmq-proto'].value|[0]"
onlyoffice_jpq_rabbitmq_pwd: "[?question=='onlyoffice/rabbitmq-pwd'].value|[0]"
onlyoffice_jpq_rabbitmq_user: "[?question=='onlyoffice/rabbitmq-user'].value|[0]"
# MariaDB
onlyoffice_mariadb_priv:
- ALTER
- ALTER ROUTINE
- CREATE
- CREATE ROUTINE
- CREATE TEMPORARY TABLES
- CREATE VIEW
- DELETE
- DROP
- EXECUTE
- INDEX
- INSERT
- LOCK TABLES
- REFERENCES
- SELECT
- SHOW VIEW
- TRIGGER
- UPDATE
# These variables are reset when this role is run, they are defined here to avoid undefined variable erors
onlyoffice_db_pwd: ""
onlyoffice_fs_secret: ""
onlyoffice_jwt_secret: ""
onlyoffice_rabbitmq_pwd: ""
# URL for RabbitMQ
# onlyoffice_rabbitmq_url: "{{ onlyoffice_rabbitmq_proto }}://{{ onlyoffice_rabbitmq_user }}:{{ onlyoffice_rabbitmq_pwd }}@{{ onlyoffice_rabbitmq_host }}"
# ASCII armored GPG public key URL linked from
# https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx
onlyoffice_gpg_url: "https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE"
# Get the sha256 checksum using the following command
# wget -q 'https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE' -O - | sha256sum - | awk '{ print $1 }' | sed 's/^/"sha256:/' | sed 's/$/"/'
onlyoffice_gpg_checksum: "sha256:35470c0db19bed875fff786a2d65a62cdb056459a2b3e12fd846be96178388e4"
onlyoffice_gpg_checksum_raw: "{{ onlyoffice_gpg_checksum | regex_replace('^sha256:') }}"
# Get the GPG fingerprints using the following command
# wget -q 'https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE' -O - | gpg --dearmor | gpg --with-colons --show-keys - | grep ^fpr | sed 's/^fpr//' | sed 's/://g' | sed 's/^/ - /'
onlyoffice_gpg_fingerprints:
- E09CA29F6E178040EF22B4098320CA65CB2DE8E5
- F0DDC1B50C11AB0938CC41CB3573F47D0C4F207B
# JMESPath query for ONLYOFFICE GPG fingerprints
onlyoffice_gpg_fingerprints_query: "[?type=='fpr'].user_id"
# Get the packages available using the following command
# grep Package /var/lib/apt/lists/*onlyoffice*_Packages | awk '{print $2}' | sort -u | sed 's/^/ - /'
# or
# cat /var/lib/apt/lists/*onlyoffice*_Packages | jc --pkg-index-deb | jp [].package | yq -o=yaml -P | sed 's/^/ /'
onlyoffice_pkg:
- docspace
- docspace-api
- docspace-api-system
- docspace-backup
- docspace-backup-background
- docspace-clear-events
- docspace-common
- docspace-doceditor
- docspace-files
- docspace-files-services
- docspace-healthchecks
- docspace-identity-api
- docspace-identity-authorization
- docspace-login
- docspace-migration-runner
- docspace-notify
- docspace-people-server
- docspace-plugins
- docspace-proxy
- docspace-socket
- docspace-ssoauth
- docspace-studio
- docspace-studio-notify
- onlyoffice-communityserver
- onlyoffice-controlpanel
- onlyoffice-desktopeditors
- onlyoffice-desktopeditors-help
- onlyoffice-documentbuilder
- onlyoffice-documentserver
- onlyoffice-documentserver-de
- onlyoffice-documentserver-ee
- onlyoffice-documentserver-enterprise
- onlyoffice-documentserver-ie
- onlyoffice-xmppserver
# Get the onlyoffice-documentserver versions using the following command on a server with onlyoffice-documentserver installed
# apt-get update && apt-cache madison onlyoffice-documentserver | awk '{ print $3 }' | sed 's/^/ - /'
onlyoffice_docserver_versions:
- 8.3.0-94
- 8.2.2-22
- 8.2.1-38
- 8.2.0-143
- 8.1.3-4
- 8.1.1-26
- 8.1.0-169
- 8.0.1-31
- 8.0.0-99
- 7.5.1-23
- 7.5.0-125
- 7.4.1-36
- 7.4.0-163
- 7.3.3-49~stretch
- 7.3.2-8~stretch
- 7.3.0-184~stretch
- 7.2.2-56
- 7.2.1-34
- 7.2.0-204
- 7.1.1-23
- 7.1.0-215
- 7.0.1-37
- 7.0.0-132
- 6.4.2-6
- 6.4.1-45
- 6.4.0-121
- 6.3.2-2
- 6.3.1-32
- 6.3.0-111
- 6.2.2-21
- 6.2.1-24
- 6.2.0-123
- 6.1.1-53
- 6.1.0-83
...