mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
78
roles/web-app-bigbluebutton/tasks/main.yml
Normal file
78
roles/web-app-bigbluebutton/tasks/main.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
# Docker Central Database Role can't be used here
|
||||
- name: "include docker-compose role"
|
||||
include_role:
|
||||
name: docker-compose
|
||||
vars:
|
||||
database_instance: "{{ application_id }}"
|
||||
database_password: "{{ applications[application_id].credentials.postgresql_secret }}"
|
||||
database_username: "postgres"
|
||||
database_name: "" # Multiple databases
|
||||
|
||||
- name: "Seed BigBlueButton Database for Backup"
|
||||
include_tasks: "{{ playbook_dir }}/roles/backup-docker-to-local/tasks/seed-database-to-backup.yml"
|
||||
vars:
|
||||
database_instance: "{{ application_id }}"
|
||||
database_password: "{{ applications[application_id].credentials.postgresql_secret }}"
|
||||
database_username: "postgres"
|
||||
database_name: "" # Multiple databases
|
||||
|
||||
- name: "include role webserver-proxy-domain for {{application_id}}"
|
||||
include_role:
|
||||
name: webserver-proxy-domain
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "https://github.com/bigbluebutton/docker.git"
|
||||
dest: "{{ bbb_repository_directory }}"
|
||||
update: yes
|
||||
recursive: yes
|
||||
version: main
|
||||
notify: setup bigbluebutton
|
||||
|
||||
- name: configure websocket_upgrade.conf
|
||||
copy:
|
||||
src: "websocket_upgrade.conf"
|
||||
dest: "{{nginx.directories.http.maps}}websocket_upgrade.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "Remove directory {{ docker_compose.directories.env }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ docker_compose.directories.env }}"
|
||||
state: absent
|
||||
|
||||
- name: deploy .env
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{ bbb_env_file_origine }}"
|
||||
notify: setup bigbluebutton
|
||||
|
||||
- name: Create symbolic link from .env file to target location
|
||||
ansible.builtin.file:
|
||||
src: "{{ bbb_env_file_origine }}"
|
||||
dest: "{{ bbb_env_file_link }}"
|
||||
state: link
|
||||
notify: setup bigbluebutton
|
||||
|
||||
- name: flush docker service
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Wait for BigBlueButton
|
||||
wait_for:
|
||||
host: "{{ domains | get_domain('bigbluebutton') }}"
|
||||
port: 80
|
||||
delay: 5
|
||||
timeout: 600
|
||||
|
||||
- name: create admin
|
||||
command:
|
||||
cmd: docker compose exec greenlight bundle exec rake admin:create
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
when: applications.bigbluebutton.setup | bool
|
||||
ignore_errors: true
|
||||
register: admin_creation_result
|
||||
|
||||
- name: print admin user data
|
||||
debug:
|
||||
msg: "{{ admin_creation_result.stdout }}"
|
||||
when: applications.bigbluebutton.setup | bool
|
Reference in New Issue
Block a user