Open pdelaby opened 2 years ago
Then, the service is updated via
docker_swarm_service
(which shoud dodocker service update thestack_theservice --force
i guess )
Well, it does not: it calls the Docker API instead. Potentially docker service update thestack_theservice --force
does more complicated things than what the module does.
SUMMARY
Task docker_swarm_service remove the stack from an existing service.
A service "thestack_theservice" is created by
docker_stack
Then, the service is updated via
docker_swarm_service
(which shoud dodocker service update thestack_theservice --force
i guess )The service is restarted as expected, but is removed from the stack.
In this Portainer screenshot, we can see the first service was created with the stack, and then stopped, and the recreated service has no stack.
ISSUE TYPE
COMPONENT NAME
docker_swarm_service
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Debian in Windows 11, started via
wsl --distribution Debian
STEPS TO REPRODUCE
Run
EXPECTED RESULTS
docker stack services thestack
displays the serviceACTUAL RESULTS
Service is not in the stack anymore