added basic structure for main deploy and wrote first itteration for code->nc connector
This commit is contained in:
@@ -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).
|
||||
|
||||
+57
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user