mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 07:18:09 +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:
35
roles/web-app-moodle/tasks/main.yml
Normal file
35
roles/web-app-moodle/tasks/main.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: "include service-rdbms-central"
|
||||
include_role:
|
||||
name: service-rdbms-central
|
||||
|
||||
- name: "include role webserver-proxy-domain for {{application_id}}"
|
||||
include_role:
|
||||
name: webserver-proxy-domain
|
||||
vars:
|
||||
domain: "{{ domains | get_domain(application_id) }}"
|
||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||
|
||||
- name: Wait until the Moodle container is healthy
|
||||
shell: docker inspect --format '{% raw %}{{.State.Health.Status}}{% endraw %}' {{ container_name }}
|
||||
register: health_check
|
||||
until: health_check.stdout.strip() == "healthy"
|
||||
retries: 120
|
||||
delay: 5
|
||||
|
||||
- name: "Include ownership settings tasks for moodle"
|
||||
include_tasks: ownership.yml
|
||||
|
||||
- name: "Configure OIDC login for Moodle if enabled"
|
||||
include_tasks: oidc.yml
|
||||
when: applications | is_feature_enabled('oidc',application_id)
|
||||
|
||||
- name: Run Moodle system check
|
||||
command: >
|
||||
docker exec --user {{ bitnami_user }} {{ container_name }}
|
||||
php /opt/bitnami/moodle/admin/cli/checks.php
|
||||
register: moodle_checks
|
||||
changed_when: false
|
||||
failed_when: >
|
||||
moodle_checks.rc != 0 or
|
||||
"OK: All" not in moodle_checks.stdout
|
Reference in New Issue
Block a user