Solved is_feature_enabled bug and implemented Dockerfile for moodle

This commit is contained in:
2025-05-16 10:22:54 +02:00
parent 52ba4dc3a1
commit 8ffb6a9cee
5 changed files with 26 additions and 12 deletions

View File

@@ -10,9 +10,15 @@
domain: "{{ domains[application_id] }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "Transfer Dockerfile to {{ docker_compose.directories.instance }}"
copy:
src: Dockerfile.j2
dest: "{{ docker_compose.directories.instance }}Dockerfile"
notify: docker compose project build and setup
- name: "copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- name: "Configure OIDC login for Moodle if enabled"
include_tasks: oidc.yml
when: applications | is_feature_enabled('oidc',application)
when: applications | is_feature_enabled('oidc',application_id)

View File

@@ -1,13 +1,4 @@
---
- name: "Ensure OIDC plugin is installed inside container"
command: >
docker exec {{ container_name }} bash -c '
set -e;
cd /bitnami/moodle;
if [ ! -d "auth/oidc" ]; then
git clone https://github.com/microsoft/moodle-auth_oidc.git auth/oidc;
fi'
- name: "Upgrade Moodle to apply OIDC plugin"
command: "docker exec {{ container_name }} php admin/cli/upgrade.php --non-interactive"