Refactor docker compose exec usage

Introduce centralized variables:
- docker_compose_command_base
- docker_compose_command_exec

Replaced hardcoded 'docker compose exec' with '{{ docker_compose_command_exec }}'
across multiple roles (BigBlueButton, EspoCRM, Friendica, Listmonk, Mailu, Matrix, OpenProject).
Ensures consistent environment file loading and reduces duplicated code.

Details: https://chatgpt.com/share/68d6a276-19d0-800f-839d-d191d97f7c41
This commit is contained in:
2025-09-26 16:26:17 +02:00
parent bcee1fecdf
commit 9082443753
12 changed files with 21 additions and 19 deletions

View File

@@ -16,7 +16,7 @@
- name: "Create default admin"
command:
cmd: >
docker compose exec greenlight
{{ docker_compose_command_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
@@ -26,6 +26,6 @@
- name: "Make existing user administrator"
command:
cmd: >
docker compose exec greenlight
{{ docker_compose_command_exec }} greenlight
bundle exec rake user:set_admin_role['{{ users.administrator.email }}']
chdir: "{{ docker_compose.directories.instance }}"

View File

@@ -42,4 +42,4 @@ BBB_COTURN_ENABLED: "{{ applications | get_app_conf(applicatio
### SSO
BBB_LDAP_ENABLED: "{{ applications | get_app_conf(application_id, 'features.ldap') }}"
BBB_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc') }}"
BBB_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc') }}"