Files
ping-mee-ansible-library/playbooks/linux/ubuntu-server/deploy_collabora_code.yml
T

84 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ================================================================
# PLAY 0 — Bootstrap: install acl BEFORE any become_user is used.
# ================================================================
- name: Bootstrap ensure acl is installed
hosts: collabora_code
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 — Main Collabora Code installation
# ================================================================
- name: Add Collabore signing key and sources
hosts: collabora_code
become: true
tasks:
- name: Ensure the apt keyrings directory exists
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
- name: Download Collabora CODE GPG signing key
ansible.builtin.get_url:
url: https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
dest: /etc/apt/keyrings/collaboraonline-release-keyring.gpg
mode: '0644'
- name: Add Collabora CODE APT repository (DEB822 format)
ansible.builtin.deb822_repository:
name: collaboraonline
types: [deb]
uris: [https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb]
suites: ['./']
signed_by: /etc/apt/keyrings/collaboraonline-release-keyring.gpg
state: present
- name: Update apt cache and install Collabora packages
ansible.builtin.apt:
name:
- apt-transport-https
- ca-certificates
- coolwsd
- code-brand
state: present
update_cache: yes
# ================================================================
# PLAY 2 — Configure Collabora CODE
# ================================================================
- name: Configure Collabora CODE
hosts: collabora_code
become: true
vars:
collabora_code_domain: "office.test.local"
collabora_admin_password: "Start2026!" #ÄNDERN
nextcloud_domain: "cloud.test.local"
tasks:
- name: Configure Collabora CODE to use the correct domain
ansible.builtin.shell:
cmd: coolconfig set storage.wopi.host {{ nextcloud_domain }}
- name: Configure Collabora CODE to disable SSL
ansible.builtin.shell:
cmd: coolconfig set ssl.enable false && coolconfig set ssl.termination true
- name: Configure Collabora CODE to set the admin password
ansible.builtin.shell:
cmd: coolconfig set set-admin-password {{ collabora_admin_password }}
- name: Restart Collabora CODE service
ansible.builtin.service:
name: coolwsd
state: restarted