mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	Context: debugging mediasoup/WebRTC failures caused by empty/interpolated vars (EXTERNAL_IPv4, etc.). - Normalize config/main.yml (ip6_enabled flag, enable greenlight/coturn) and tidy formatting. - Extend vars/main.yml with BBB_* switches (IPv6, Greenlight, Coturn), TURN/Coturn cert paths. - env.j2: wire secrets & toggles, guard IPv6 via BBB_IP6_ENABLED, switch LDAP/OIDC to role flags, add TURN/STUN, and general cleanup. - tasks/main.yml: use BBB_* fact names, robust path joins, write docker-compose.override.yml, and notify compose on env/override changes. - tasks/01_docker-compose.yml: reference new BBB_DOCKER_COMPOSE_* facts. - Add templates/docker-compose.override.yml.j2 (placeholder for SFU overrides to avoid bad defaults during runs). Rationale: make Compose brings deterministic (no empty ), paving the way to set MS_WEBRTC_LISTEN_IPS in override without risk. Chat reference: debugging thread with GPT-5 Thinking on 2025-09-26 https://chatgpt.com/share/68d59d98-4388-800f-a627-07b6a603d0b2.
		
			
				
	
	
		
			71 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			2.3 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"
 | |
| 
 | |
| 
 |