fix: Use docker run for oCIS init instead of docker_container module
ci/woodpecker/manual/run-ansible Pipeline failed
ci/woodpecker/push/security-scan Pipeline failed

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:
2026-03-29 19:54:59 +02:00
co-authored by Claude Opus 4.6
parent c5a7c3933c
commit 8b9a07dc23
+8 -18
View File
@@ -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