Optimized OIDC Login for Nextcloud

This commit is contained in:
2025-02-25 19:35:48 +01:00
parent 9a9bae4f2c
commit 72b787814e
16 changed files with 181 additions and 75 deletions

View File

@@ -1,18 +1,18 @@
- name: "Substitute http with https in {{ nextcloud_config_file_path }}"
- name: "Substitute http with https in {{ nextcloud_config_file_host_path }}"
replace:
path: "{{ nextcloud_config_file_path }}"
path: "{{ nextcloud_config_file_host_path }}"
regexp: "http://{{ domain | regex_escape }}"
replace: "https://{{ domain }}"
notify:
- docker compose restart
#- name: Ensure 'overwriteprotocol' is set to 'https' in Nextcloud {{ nextcloud_config_file_path }}
#- name: Ensure 'overwriteprotocol' is set to 'https' in Nextcloud {{ nextcloud_config_file_host_path }}
# block:
# Deactivated because it was really heavy to fix.
# @todo implement
# - name: Check if 'overwriteprotocol' is already set
# lineinfile:
# path: "{{ nextcloud_config_file_path }}"
# path: "{{ nextcloud_config_file_host_path }}"
# regexp: "^\s*overwriteprotocol\s*=>\s*http"
# line: "overwriteprotocol => 'https',"
# backrefs: yes
@@ -22,7 +22,7 @@
#
# - name: Add 'overwriteprotocol' => 'https' if not present
# lineinfile:
# path: "{{ nextcloud_config_file_path }}"
# path: "{{ nextcloud_config_file_host_path }}"
# regexp: "^\s*\);$"
# line: "overwriteprotocol => 'https',"
# insertafter: "^\s*\);$"