mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
Patched url in moodle config
This commit is contained in:
parent
e8fa22cb43
commit
0607974dac
@ -19,7 +19,7 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Patch Moodle config.php with updated DB credentials
|
||||
- name: Patch Moodle config.php with updated DB and wwwroot credentials
|
||||
when: config_file_exists.rc == 0
|
||||
block:
|
||||
- name: Update DB host
|
||||
@ -41,3 +41,8 @@
|
||||
command: >
|
||||
docker exec --user root {{ moodle_container }}
|
||||
sed -i "s/^\$CFG->dbpass *= *.*/\$CFG->dbpass = '{{ database_password }}';/" {{ moodle_config }}
|
||||
|
||||
- name: Update CFG->wwwroot via sed in container
|
||||
command: >
|
||||
docker exec --user root {{ moodle_container }}
|
||||
sed -i -E "s|^(\$CFG->wwwroot[[:space:]]*=[[:space:]]*).*$|\1'{{ domains | get_url(application_id, WEB_PROTOCOL) }}';|" {{ moodle_config }}
|
@ -4,7 +4,7 @@
|
||||
name: cmp-db-docker-proxy
|
||||
|
||||
- name: "Update database credentials"
|
||||
include_tasks: 01_database.yml
|
||||
include_tasks: 01_patch_config.yml
|
||||
|
||||
- name: flush docker service
|
||||
meta: flush_handlers
|
||||
|
Loading…
x
Reference in New Issue
Block a user