Commit 8d77255f authored by Chris Croome's avatar Chris Croome

Even more checks to stop collabora container...

parent d2a8a1ee
......@@ -62,6 +62,24 @@
pause:
seconds: 60
when: ( nextcloud_collabora_docker_container.stdout is defined ) and ( nextcloud_collabora_docker_container.stdout != "" )
- name: Manually check if there is a Docker container listening on port 9980
shell: fuser 9980/tcp | grep 9980
register: nextcloud_collabora_docker_port
- name: Get the running container ID
shell: docker ps | grep -v ^CONTAINER | awk '{ print $1 }'
register: nextcloud_collabora_docker_container_port
when: ( nextcloud_collabora_docker_port.stdout is defined ) and ( nextcloud_collabora_docker_port.stdout == "9980/tcp:" )
- name: Stop the Collabora container manually
command: "docker stop {{ nextcloud_collabora_docker_container_port.stdout }}"
when: ( nextcloud_collabora_docker_port.stdout is defined ) and ( nextcloud_collabora_docker_port.stdout == "9980/tcp:" )
- name: Pause before starting Collabora container
pause:
seconds: 60
when: ( nextcloud_collabora_docker_port.stdout is defined ) and ( nextcloud_collabora_docker_port.stdout == "9980/tcp:" )
- name: Start the Collabora container
docker_container:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment