Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud reloaded - Collabora installation fixes #144

Open
wants to merge 7 commits into
base: nextcloud-reloaded
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/collabora/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# handlers file for loolwsd

- name: restart loolwsd
- name: restart coolwsd
systemd:
name: loolwsd.service
name: coolwsd.service
state: restarted
6 changes: 3 additions & 3 deletions roles/collabora/tasks/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
- name: install collabora
apt:
name:
- "loolwsd"
- "coolwsd"
- "code-brand"
- "python3-lxml"
- "collaboraoffice6.4-dict*"
- "collaboraofficebasis6.4*"
- "collaboraoffice-dict-*"
- "collaboraofficebasis-*"
state: latest
33 changes: 18 additions & 15 deletions roles/collabora/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
# tasks file for collabora installation

- name: create group lool
- name: create group cool
group:
name: lool
name: cool
system: true
state: present

- name: create user lool
- name: create user cool
user:
name: lool
group: lool
home: /opt/lool
name: cool
group: cool
home: /opt/cool
shell: /usr/sbin/nologin
system: true
state: present

- name: create /etc/loolwsd
- name: create /etc/coolwsd
file:
path: /etc/loolwsd
path: /etc/coolwsd
owner: root
group: root
mode: 0755
Expand All @@ -33,28 +33,31 @@

- name: set allow domain {{ nextcloud_fqdn | regex_replace('\\.', '\\.') }}
xml:
path: /etc/loolwsd/loolwsd.xml
path: /etc/coolwsd/coolwsd.xml
xpath: /config/storage/wopi
attribute: allow
set_children:
- host: "{{ nextcloud_fqdn | regex_replace('\\.', '\\.') }}"
backup: yes
notify: restart loolwsd
notify: restart coolwsd

- name: loolwsd.xml add attribute allow domain {{ nextcloud_fqdn | regex_replace('\\.', '\\.') }}
- name: coolwsd.xml add attribute allow domain {{ nextcloud_fqdn | regex_replace('\\.', '\\.') }}
xml:
path: /etc/loolwsd/loolwsd.xml
path: /etc/coolwsd/coolwsd.xml
xpath: /config/storage/wopi/host[text()="{{ item }}"]
attribute: allow
value: 'true'
backup: yes
loop:
- "{{ nextcloud_fqdn | regex_replace('\\.', '\\.') }}"
notify: restart loolwsd
notify: restart coolwsd

- name: start loolwsd
- name: Return motd to registered var
ansible.builtin.command: sudo coolconfig set ssl.enable false && sudo coolconfig set ssl.termination true && sudo coolconfig set storage.wopi.host ooyetu.irdidoes.tech

- name: start coolwsd
systemd:
name: loolwsd.service
name: coolwsd.service
state: started
enabled: true

Expand Down
4 changes: 2 additions & 2 deletions roles/collabora/tasks/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: install needed collabora packages
yum:
name:
- loolwsd
- coolwsd
- CODE-brand
- collaboraoffice6.2-dict*
- collaboraofficebasis6.2*
Expand All @@ -30,4 +30,4 @@
pip:
name: lxml
state: latest
executable: pip3
executable: pip3
6 changes: 3 additions & 3 deletions roles/collabora/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# vars file for collabora

tls_certificate_common_name: "{{ nextcloud_fqdn }}"
tls_certificate_directory: /etc/loolwsd
tls_certificate_directory: /etc/coolwsd
tls_certificate_file: "{{ tls_certificate_directory }}/cert.pem"
tls_certificate_key: "{{ tls_certificate_directory }}/key.pem"
tls_certificate_csr: "{{ tls_certificate_directory }}/csr.pem"
tls_certificate_fullchain: "{{ tls_certificate_directory }}/ca-chain.cert.pem"
tls_certificate_ca: "{{ tls_certificate_directory }}/ca.pem"
tls_certificate_owner: lool
tls_certificate_group: lool
tls_certificate_owner: cool
tls_certificate_group: cool
tls_certificate_type: selfsigned
2 changes: 1 addition & 1 deletion roles/webserver/templates/apache/nextcloud.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

{% if install_collabora %}
# load collabora config
IncludeOptional conf-available/loolwsd.conf
IncludeOptional conf-available/coolwsd.conf
{% endif %}

</VirtualHost>
4 changes: 2 additions & 2 deletions roles/webserver/templates/nginx/nextcloud.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ server {
}

{% if install_collabora|bool %}
location ^~ /loleaflet {
location ^~ /browser {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
Expand All @@ -101,7 +101,7 @@ server {
proxy_set_header Host $http_host;
}

location ^~ /lool {
location ^~ /cool {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
Expand Down