chore(server): allow configuring dbhost even after first initialization

This commit is contained in:
transcaffeine 2021-10-21 22:21:24 +02:00
parent 5d00b7637d
commit dd295b4129
Signed by: transcaffeine
GPG Key ID: 03624C433676E465

View File

@ -130,3 +130,20 @@
user: "{{ nextcloud_user_info.uid }}" user: "{{ nextcloud_user_info.uid }}"
tty: yes tty: yes
when: nextcloud_current_backgroundjob_mode.stdout != nextcloud_background_job_mode when: nextcloud_current_backgroundjob_mode.stdout != nextcloud_background_job_mode
- name: Check nextcloud database host
community.docker.docker_container_exec:
container: "{{ nextcloud_container_name }}"
command: "{{ nextcloud_occ_command }} config:system:get dbhost"
user: "{{ nextcloud_user_info.uid }}"
tty: yes
register: nextcloud_current_dbhost
- name: Set nextcloud database host mode to {{ nextcloud_database_host }}
community.docker.docker_container_exec:
container: "{{ nextcloud_container_name }}"
command: "{{ nextcloud_occ_command }} config:system:set dbhost --value={{ nextcloud_database_host }} --update-only -n"
user: "{{ nextcloud_user_info.uid }}"
tty: yes
when: nextcloud_current_dbhost.stdout != nextcloud_database_host
notify: restart-nextcloud