mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-10 02:38:10 +02:00
- Split internal/external Coturn for BBB and Nextcloud - Added dedicated relay port ranges per app - Updated env and compose overrides for coturn - Ensure coturn role is loaded conditionally - Standardize credential/env passing for coturn @See https://chatgpt.com/share/68d6f376-4878-800f-b4f7-62822caa49ea
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
---
|
|
- name: Render HTML-Location-Block in Variable
|
|
set_fact:
|
|
proxy_extra_configuration: >-
|
|
{{ lookup('ansible.builtin.template',
|
|
playbook_dir ~ '/roles/sys-svc-proxy/templates/location/html.conf.j2') | trim }}
|
|
vars:
|
|
location: '^~ /html5client'
|
|
oauth2_proxy_enabled: false
|
|
proxy_lua_enabled: false
|
|
|
|
- name: "load docker, proxy for '{{ application_id }}'"
|
|
include_role:
|
|
name: sys-stk-full-stateless
|
|
vars:
|
|
docker_compose_flush_handlers: false
|
|
- name: "include 04_seed-database-to-backup.yml"
|
|
include_tasks: "{{ [ playbook_dir, 'roles/sys-ctl-bkp-docker-2-loc/tasks/04_seed-database-to-backup.yml' ] | path_join }}"
|
|
|
|
- name: "Unset 'proxy_extra_configuration'"
|
|
set_fact:
|
|
proxy_extra_configuration: null
|
|
|
|
- name: configure websocket_upgrade.conf
|
|
copy:
|
|
src: "websocket_upgrade.conf"
|
|
dest: "{{ [ NGINX.DIRECTORIES.HTTP.MAPS, 'websocket_upgrade.conf' ] | path_join }}"
|
|
notify: restart openresty
|
|
|
|
- name: "Set BBB Facts"
|
|
set_fact:
|
|
BBB_ENV_FILE_LINK: "{{ [ docker_repository_path, '.env' ] | path_join }}"
|
|
BBB_ENV_FILE_ORIGINE: "{{ docker_compose.files.env }}"
|
|
BBB_DOCKER_COMPOSE_FILE_ORIGINE: "{{ [ docker_repository_path, 'docker-compose.yml' ] | path_join }}"
|
|
BBB_DOCKER_COMPOSE_FILE_FINAL: "{{ [ docker_compose.directories.instance, 'docker-compose.yml' ] | path_join }}"
|
|
|
|
- name: Write docker-compose.override.yml for BigBlueButton
|
|
template:
|
|
src: docker-compose.override.yml.j2
|
|
dest: "{{ [ docker_compose.directories.instance, 'docker-compose.override.yml' ] | path_join }}"
|
|
notify:
|
|
- docker compose up
|
|
|
|
- name: deploy .env
|
|
# This seems redundant @todo Checkout if this is true and if so, delete it
|
|
template:
|
|
src: env.j2
|
|
dest: "{{ BBB_ENV_FILE_ORIGINE }}"
|
|
notify:
|
|
- docker compose up
|
|
|
|
- name: Create symbolic link from .env file to target location
|
|
file:
|
|
src: "{{ BBB_ENV_FILE_ORIGINE }}"
|
|
dest: "{{ BBB_ENV_FILE_LINK }}"
|
|
state: link
|
|
|
|
- name: "Setup docker-compose.yml file"
|
|
include_tasks: "01_docker-compose.yml"
|
|
|
|
- name: Ensure all containers in instance are running
|
|
include_tasks: "{{ [ playbook_dir , 'roles/docker-compose/tasks/05_ensure_up.yml' ] | path_join }}"
|
|
|
|
- name: flush docker service
|
|
meta: flush_handlers
|
|
|
|
- name: "Setup administrator"
|
|
include_tasks: "02_administrator.yml"
|
|
|
|
|
|
- name: "Load Coturn Role for '{{ application_id }}'"
|
|
include_role:
|
|
name: web-svc-coturn
|
|
vars:
|
|
flush_handlers: true
|
|
when:
|
|
- run_once_web_svc_coturn is not defined
|
|
- not BBB_INTERNAL_COTURN_ENABLED
|
|
|
|
|