Compare commits

..

2 Commits

Author SHA1 Message Date
5eb587afd9 add some issues after test on debian
add code_use_apache bool as apache config on debian is not done yet
2024-05-24 22:52:32 +02:00
abdd1a8fb4 trying to make it work on debian - wip 2024-02-29 21:41:25 +01:00
7 changed files with 48 additions and 5 deletions

View File

@@ -1 +1,5 @@
2023-12-10 : won't work when using multiple instance (alpine) -> need fix . see alpine config
2023-12-10 : won't work when using multiple instance (alpine) -> need fix . see alpine config
2024-05-24 : debian version still refers to /etc/httpd . also need to enable a couple apache modules: proxy, proxy_http proxy_wstunnel
?? apache2/mods-enabled/proxy_http.load
?? apache2/mods-enabled/proxy_wstunnel.load

View File

@@ -12,6 +12,7 @@ Role Variables
--------------
code_clients: list of ips and hostname that should be allowed to use code server. ip in the form "10\.10\.10\.10". ex:
code_use_apache: default true - wether we configure apache for code access
```yaml
code_clients:

View File

@@ -1,2 +1,3 @@
---
# defaults file for tco.code
code_use_apache: true

View File

@@ -1,9 +1,13 @@
---
# tasks file for tco.code
#
- name: "[Code] - import os vars"
ansible.builtin.include_vars: "{{ ansible_os_family|lower }}.yml"
tags: always
- name: "[Code] - prereq"
ansible.builtin.package:
name: python-lxml
name: "{{ code_deps }}"
state: present
- name: "[Code] - repository"
@@ -12,12 +16,25 @@
name: Collabora Code repo
description: Collabora Code repo
gpgkey: "https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7/repodata/repomd.xml.key"
when: ansible_os_family | lower == 'redhat'
- name: "[Code] - repository - debian"
block:
- name: setup repo key
ansible.builtin.get_url:
url: https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
dest: /etc/apt/keyrings/code.gpg
- name: setup source list
ansible.builtin.template:
src: sources.list
dest: /etc/apt/sources.list.d/collaboraonline.sources
when: ansible_os_family | lower == 'debian'
- name: "[Code] - install packages"
ansible.builtin.package:
name:
- coolwsd
- CODE-brand
update_cache: true
name: "{{ code_packages }}"
state: present
- name: "[Code] - disable ssl"
@@ -41,6 +58,7 @@
add_children:
"{{ code_clients }}"
notify: restart coolwsd
when: code_clients is defined
- name: "[Code] - deploy apache conf"
block:
@@ -53,6 +71,7 @@
line: include /etc/httpd/conf.d/code_apache.conf.inc
insertafter: "ServerName"
notify: restart apache
when: code_use_apache
- name: "[Code] - enable and start service"
ansible.builtin.service:

5
templates/sources.list Normal file
View File

@@ -0,0 +1,5 @@
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb
Suites: ./
Signed-By: /etc/apt/keyrings/code.gpg

6
vars/debian.yml Normal file
View File

@@ -0,0 +1,6 @@
code_deps:
- python3-lxml
code_packages:
- coolwsd
- code-brand
apache_config_dir: /etc/apache2/conf-available/

7
vars/redhat.yml Normal file
View File

@@ -0,0 +1,7 @@
code_deps:
- python-lxml
code_packages:
- coolwsd
- CODE-brand
apache_config_dir: /etc/httpd/conf.d/