diff --git a/playbooks/linux/ubuntu-server/nextcloud_full_deployment/README.txt b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/README.txt index 0346acf..56d8cb5 100644 --- a/playbooks/linux/ubuntu-server/nextcloud_full_deployment/README.txt +++ b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/README.txt @@ -1,4 +1,5 @@ ---- Welcome ---- + This is a full-stack Nextcloud deployment combined with a hardnening and a Collabora CODE server setup and integration into Nextcloud. The minimum setup of this deployment would be a single server (this context wasn't tested yet). diff --git a/playbooks/linux/ubuntu-server/nextcloud_full_deployment/connect_nextcloud_collabora.yml b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/connect_nextcloud_collabora.yml new file mode 100644 index 0000000..7795efe --- /dev/null +++ b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/connect_nextcloud_collabora.yml @@ -0,0 +1,57 @@ +# ================================================================ +# PLAY 0 — Bootstrap: install acl BEFORE any become_user is used. +# ================================================================ +- name: Bootstrap – ensure acl is installed + hosts: nextcloud + become: true + gather_facts: false + + tasks: + - name: Update apt cache + ansible.builtin.apt: + update_cache: true + cache_valid_time: 3600 + + - name: Install acl (required for Ansible become_user on Linux) + ansible.builtin.apt: + name: acl + state: present + +# ================================================================ +# PLAY 1 — Install richdocuments and configure Office +# ================================================================ +- name: Install richdocuments and configure Office + hosts: nextcloud + become: true + vars: + nextcloud_install_dir: "/etc/nextcloud" #EDIT based on your needs + collabora_fqdn: "collabora.test.local" #EDIT based on your needs + + tasks: + - name: Enable richdocuments app + ansible.builtin.command: > + sudo -E -u www-data php occ app:install richdocuments + args: + chdir: /etc/nextcloud + become_user: www-data + register: install_result + changed_when: "'already installed' not in install_result.stdout" + failed_when: install_result.rc != 0 and 'already installed' not in install_result.stdout + + - name: Point richdocuments at the Collabora server + ansible.builtin.command: > + sudo -E -u www-data php occ config:app:set richdocuments wopi_url + --value="http://{{ collabora_fqdn }}:9980" + args: + chdir: /etc/nextcloud + become_user: www-data + changed_when: true + + - name: Set the public WOPI URL (same value, used for editor loading) + ansible.builtin.command: > + sudo -E -u www-data php occ config:app:set richdocuments public_wopi_url + --value="http://{{ collabora_fqdn }}:9980" + args: + chdir: /etc/nextcloud + become_user: www-data + changed_when: true \ No newline at end of file diff --git a/playbooks/linux/ubuntu-server/nextcloud_full_deployment/deployment_start.yml b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/deployment_start.yml index 6a63f24..e48182e 100644 --- a/playbooks/linux/ubuntu-server/nextcloud_full_deployment/deployment_start.yml +++ b/playbooks/linux/ubuntu-server/nextcloud_full_deployment/deployment_start.yml @@ -1,4 +1,25 @@ +- name: Deploy hardened Nextcloud + hosts: nextcloud + tags: dp-hnc + tasks: + - ansible.builtin.include: deploy_hardened_nextcloud.yml +- name: Deploy Collabora CODE + hosts: collabora_code + tags: dp-code + tasks: + - ansible.builtin.include: deploy_collabora_code.yml +- name: Connect Nextcloud and Collabora CODE + hosts: nc2code + tags: nc2code + tasks: + - ansible.builtin.include: connect_nextcloud_collabora.yml + +- name: Connect Nextcloud to OpenExchange + hosts: nc2ex + tags: nc2ex + tasks: + - ansible.builtin.include: connect_nextcloud_openexchange.yml # This file was written by Ebbe Baß (umpi) - ebbe@ping-mee.de \ No newline at end of file