Refactor webserver proxy variables and fix BigBlueButton deployment behavior

Refactor proxy/webserver configuration variables to a consistent webserver_* naming scheme across roles. Replace legacy variables like proxy_extra_configuration, client_max_body_size, vhost_flavour, location_ws and ws_port with webserver_extra_configuration, webserver_client_max_body_size, webserver_vhost_flavour, webserver_websocket_location and webserver_websocket_port. Update NGINX vhost and location templates (html, upload, ws, basic, ws_generic) as well as callers (sys-front-inj-all, sys-stk-front-proxy, various web-app-* and web-svc-* roles) to use the new naming.

Tighten docker-compose Git repository handling by making docker_git_repository_pull depend on docker_git_repository_address being defined, a string and non-empty. This avoids accidental Git operations when the repository address is unset or of the wrong type.

Refactor the BigBlueButton role structure and fix deployment bugs: introduce 01_core.yml to orchestrate docker/proxy setup, database seeding, websocket map deployment, docker-compose overrides and admin/bootstrap logic in a single once-executed entrypoint. Rename supporting task files (02_docker-compose.yml, 03_administrator.yml, 04_dependencies.yml) and update tasks/main.yml to delegate via include_tasks with run_once_web_app_bigbluebutton. Improve Greenlight admin creation behavior by treating the 'Email has already been taken' error as a non-fatal, unchanged outcome and running user:set_admin_role as a fallback, both for the primary password and the OIDC starred-password path.

Also standardize vhost flavour selection for services like Mailu, Discourse, CDN, Collabora, Coturn, OnlyOffice, Simpleicons and web-svc-logout by explicitly passing webserver_vhost_flavour where needed and aligning client_max_body_size and websocket configuration with the new webserver_* variables.

Reference: ChatGPT conversation https://chatgpt.com/share/6931c530-bba8-800f-9997-dd61dc1d497b
This commit is contained in:
2025-12-04 18:31:09 +01:00
parent f2ace362bc
commit 986f959696
43 changed files with 210 additions and 192 deletions

View File

@@ -10,7 +10,7 @@ location {{location}}
{% include 'roles/sys-svc-proxy/templates/headers/access_control_allow.conf.j2' %}
# Client Limits for HTML
client_max_body_size {{ client_max_body_size | default('100m') }};
client_max_body_size {{ webserver_client_max_body_size | default('100m') }};
{% set _loc = location|trim %}
proxy_pass http://127.0.0.1:{{ http_port }}{{ (_loc|regex_replace('^(?:=|\\^~)\\s*','')) if not (_loc is match('^(@|~)')) else '' }};

View File

@@ -13,5 +13,5 @@ location {{ location_upload }} {
proxy_send_timeout 120s;
# Client Limits for Upload
client_max_body_size {{ client_max_body_size }};
client_max_body_size {{ webserver_client_max_body_size }};
}

View File

@@ -1,9 +1,9 @@
location {{ location_ws }} {
location {{ webserver_websocket_location }} {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:{{ ws_port }};
proxy_pass http://127.0.0.1:{{ webserver_websocket_port }};
# Proxy buffering needs to be disabled for websockets.
proxy_buffering off;

View File

@@ -9,9 +9,9 @@ server
{% include 'roles/sys-front-inj-all/templates/server.conf.j2'%}
{% if proxy_extra_configuration is defined %}
{% if webserver_extra_configuration is defined %}
{# Additional Domain Specific Configuration #}
{{ proxy_extra_configuration }}
{{ webserver_extra_configuration }}
{% endif %}
{% include 'roles/sys-svc-letsencrypt/templates/ssl_header.j2' %}

View File

@@ -5,7 +5,7 @@ server {
{% include 'roles/sys-front-inj-all/templates/server.conf.j2' %}
client_max_body_size {{ client_max_body_size | default('100m') }};
client_max_body_size {{ webserver_client_max_body_size | default('100m') }};
keepalive_timeout 70;
sendfile on;
@@ -22,7 +22,7 @@ server {
{% include 'roles/sys-svc-proxy/templates/location/html.conf.j2' %}
{% if location_ws | default(false) %}
{% if webserver_websocket_location | default(false) %}
{% include 'roles/sys-svc-proxy/templates/location/ws.conf.j2' %}
{% endif %}