34 lines
1.1 KiB
YAML
Raw Normal View History

- name: "Substitute http with https in {{ nextcloud_config_file_path }}"
replace:
path: "{{ nextcloud_config_file_path }}"
regexp: "http://{{ domain | regex_escape }}"
replace: "https://{{ domain }}"
notify:
- docker compose restart
2025-02-21 11:40:29 +01:00
#- name: Ensure 'overwriteprotocol' is set to 'https' in Nextcloud {{ nextcloud_config_file_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 }}"
# regexp: "^\s*overwriteprotocol\s*=>\s*http"
# line: "overwriteprotocol => 'https',"
# backrefs: yes
# state: present
# notify:
# - docker compose restart
#
# - name: Add 'overwriteprotocol' => 'https' if not present
# lineinfile:
# path: "{{ nextcloud_config_file_path }}"
# regexp: "^\s*\);$"
# line: "overwriteprotocol => 'https',"
# insertafter: "^\s*\);$"
# state: present
# notify:
# - docker compose restart
# notify:
# - docker compose restart