mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Implemented the correct setup of the bbb administrator
This commit is contained in:
16
roles/web-app-bigbluebutton/tasks/02_administrator.yml
Normal file
16
roles/web-app-bigbluebutton/tasks/02_administrator.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
- block:
|
||||
- name: "Create default admin"
|
||||
command:
|
||||
cmd: docker compose exec greenlight \
|
||||
bundle exec rake admin:create['{{ users.administrator.username | upper }}','{{ users.administrator.email }}','{{ users.administrator.password }}']
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
register: admin_creation_result
|
||||
# Treat exit codes 0 (created) and 2 (already exists) as success
|
||||
failed_when: admin_creation_result.rc not in [0,2]
|
||||
rescue:
|
||||
- name: "Make existing user administrator"
|
||||
command:
|
||||
cmd: >
|
||||
docker compose exec greenlight
|
||||
bundle exec rake user:set_admin_role['{{ users.administrator.email }}']
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
@@ -34,7 +34,7 @@
|
||||
state: link
|
||||
|
||||
- name: "Setup docker-compose.yml file"
|
||||
include_tasks: "docker-compose.yml"
|
||||
include_tasks: "01_docker-compose.yml"
|
||||
|
||||
- name: Ensure all containers in instance are running
|
||||
include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/04_ensure_up.yml"
|
||||
@@ -60,10 +60,7 @@
|
||||
delay: 5
|
||||
changed_when: false
|
||||
|
||||
- name: create admin
|
||||
command:
|
||||
cmd: docker compose exec greenlight bundle exec rake admin:create
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
when: bbb_setup
|
||||
ignore_errors: true
|
||||
register: admin_creation_result
|
||||
- name: "Setup administrator"
|
||||
include_tasks: "02_administrator.yml"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user