fix: Use docker run for oCIS init instead of docker_container module
The docker_container module with detach:false hangs indefinitely. Use shell docker run --rm which handles exit codes properly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,24 +40,14 @@
|
||||
register: ocis_config
|
||||
|
||||
- name: Initialize ownCloud Infinite Scale
|
||||
community.docker.docker_container:
|
||||
name: ocis-init
|
||||
image: "owncloud/ocis:{{ owncloud_version }}"
|
||||
command: init
|
||||
env:
|
||||
OCIS_CONFIG_DIR: /etc/ocis
|
||||
IDM_ADMIN_PASSWORD: "{{ owncloud_admin_password }}"
|
||||
volumes:
|
||||
- "{{ owncloud_data_dir }}/config:/etc/ocis"
|
||||
state: started
|
||||
detach: false
|
||||
register: ocis_init
|
||||
when: not ocis_config.stat.exists
|
||||
|
||||
- name: Remove init container
|
||||
community.docker.docker_container:
|
||||
name: ocis-init
|
||||
state: absent
|
||||
ansible.builtin.command:
|
||||
cmd: >
|
||||
docker run --rm
|
||||
-e OCIS_CONFIG_DIR=/etc/ocis
|
||||
-e IDM_ADMIN_PASSWORD={{ owncloud_admin_password }}
|
||||
-v {{ owncloud_data_dir }}/config:/etc/ocis
|
||||
owncloud/ocis:{{ owncloud_version }}
|
||||
init
|
||||
when: not ocis_config.stat.exists
|
||||
|
||||
- name: Start ownCloud via Docker Compose
|
||||
|
||||
Reference in New Issue
Block a user