Solved settings save bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-04-17 15:00:45 +02:00
parent b5b4550cfb
commit 8f8796f598
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E

View File

@ -14,11 +14,12 @@
chdir: "{{ docker_compose.directories.instance }}" chdir: "{{ docker_compose.directories.instance }}"
failed_when: false failed_when: false
- name: "Apply all OIDC settings via WP-CLI eval" - name: "Apply all OIDC settings via WP-CLI eval (safe via base64)"
# Convert the settings map to JSON and update the option in one step # Convert the settings map to base64-encoded JSON to avoid shell escaping issues
vars:
oidc_settings_json_b64: "{{ oidc_vars.oidc_settings | to_json | b64encode }}"
command: > command: >
docker-compose exec -u www-data -T application bash -lc docker-compose exec -u www-data -T application bash -lc
"settings_json='{{ oidc_vars.oidc_settings | to_json }}'; \ "wp eval \"update_option('openid_connect_generic_settings', json_decode(base64_decode('{{ oidc_settings_json_b64 }}'), true));\" --path={{ wordpress_docker_html_path }}"
wp eval \"update_option('openid_connect_generic_settings', json_decode('"$settings_json"', true));\" --path={{ wordpress_docker_html_path }}"
args: args:
chdir: "{{ docker_compose.directories.instance }}" chdir: "{{ docker_compose.directories.instance }}"